Applies a patch or a merge patch on the input JSON column.
When a (merge) patch cannot be applied, missing values will be generated, node execution will not fail.
See also the node: JSON Diff .
Given {"a":"b","c":{"d":"e","f": "g"} } let us assume the target is {"a":"z","c":{"d":"e"} } (changing a 's value to z and removing f ). To achieve this, either the following patch should be applied: [{"op":"replace","path":"/a","value":"z"},{"op":"remove","path":"/c/f"}] or this merge and patch: {"a":"z","c":{"f": null} }
The following operators ( op ) are supported for patch:
- add ( path , value )
- remove ( path )
- replace ( path , value )
- move ( from , path )
- copy ( from , path )
- test ( path , value )
The merge and patch format reconstructs the parts that need to be changed (changes included), all else can be omitted.
It uses the fge/json-patch implementation.
To refer to flow variables, use the $${TflowVarName}$$ syntax (where T is S for String type, D for floating point numbers and I for integer numbers).
To refer to columns (boolean, numeric, String, JSON), use the $columnName$ syntax.
References to ( 0 -based) row index ( $$ROWINDEX$$ ), row count ( $$ROWCOUNT$$ ) and row keys ( $$ROWID$$ ) can also be used in values.