Merge
The Merge action merges an array into an array, or an object into an object.
The following table shows the parameters for the Merge action.
Name | Data type | Required | Notes |
---|---|---|---|
sourcePath | JPath | Yes | The object or array to copy from. |
targetPath | JPath | Yes | The object or array to merge into. |
XML Example:
This action copies all objects that have a type_id value of 4 in the array at location /events in the State to the array at /cumulativeEvents. Any objects already in /cumulativeEvents are preserved.
<Merge sourcePath="/events[@type_id = 4]" targetPath="/cummulativeEvents" />