Copy
The Copy action copies one part of the State to another.
The following table shows the parameters for the Copy action.
Name | Data type | Required | Notes |
---|---|---|---|
sourcePath | JPath | Yes | The path to copy. This path can be either a static path or a query. |
targetPath | JPath | Yes | The location to which the path is copied. This path overwrites anything that is stored at this location. |
XML Example
This action copies the objects from the array at /events with a type_id of 4 to an array at location /interestingEvents, and erasing anything that was stored there previously.
<Copy sourcePath="/events[@type_id = 4]" targetPath="/interestingEvents" />