Actions Syntax for Rules

ActionExampleNotes
add Adds an entry to an existing array. Needs "index" and "value". "index" should be 0 for the first element in the array, any number after that for the middle of the array. If "index" is larger than the array size, the value is added to the end of the array.
put Add an attribute and value to an existing JSON value. Needs "key" and "value". "value" can be a string or an array.
set Set a value on an existing JSON attribute. Needs "value".
delete Remove a node in the existing JSON tree.
eval Evaluate the expression specified in 'value' and assign results to the context variable specified by 'key' (if set). Context attribute can be referenced using the expression: ${Rules.Eval.<variable_name>}. The scope of the eval variable is the entire document if performed in a rule, or the macro if performed within a macro.
replace Replace any text string throughout the entire document. Use when regular expressions are not an option. Can still use expressions. Instead of using the 'replace' action, you can perform targeted search and replace (JSON Path) with ${string:replace(...)}. In cases requiring regular expressions, use ${string:replaceFirst(...)}, ${string:replaceAll(...)}.

Example add action:

Example put action:

Example set action:

Example delete action:

Example eval action:

Example replace action: