Update Json Object
Modifies the value at path of object using predicate
Description
Modifies the value at path of object using predicate. If a portion of path doesn't exist, it's created.
Example:
-
inputs
- source =
{ "a": [{ "b": { "c": 3 } }] }
- paths =
"a[0].b.c"
- iteratee =
(value) => value * value
- source =
-
outputs
- result =
{ "a": [{ "b": { "c": 9 } }] }
- result =
Inputs
- Source (Object): The json object or string to modify
- Paths (Object): String or array of string
- Updater (Updater): The predicate function that invokes per every entry (key, value).
Inputs:
-value (Object)
: The current value of the object.
Outputs:
-Result (Object)
: The updated value.
Outputs
- Result (Object): The modified object
- Error Flow (Error Flow): Triggered by providing incorrect json object or string