Insert JSON
This action inserts a new property (name/value pair) into a JSON object or a new item into a JSON array.
The step only works on JSON variables.
Properties
The Insert JSON action can be configured using the following properties:
- Insert What
-
This option defines a new property to insert. If this option is used then the found JSON value must be an object otherwise an error is produced. The new property is defined by the two properties:
- Object Property
-
This option defines a new property to insert. If this option is used then the found JSON value must be an object otherwise an error is produced. The new property is defined by the two properties:
- Name
-
This is the name of the new property. This must of course be a valid property name, e.g. quotation marks should be escaped.
- Value
-
This is the value of the property which must be a valid JSON value, e.g. if you want to insert a text this must be quoted.
- Array Item
-
This option defines a new item to insert. If this option is used then the found JSON value must be an array otherwise an error is produced. The new property is defined by this property:
- Value
-
This is the value of the item which must be a valid JSON value, that is. if you want to insert a text this must be quoted.
- Insert Where
-
Choose where to insert the new JSON relative to the found JSON value. The options are:
- Before
-
This will insert the property or item before the found JSON.
- First
-
This will insert the property or item as the first property in a JSON object or array.
- Last
-
This will insert the property or item as the last property in a JSON object or array.
- After
-
This will insert the property or item after the found JSON.
- Set as Named JSON
-
Select this property to set a named JSON on the item.
- Auto
-
Gives the item a name that is a number. The first auto-numbered item is 1, the next is 2, and so on.
- Named
-
Gives the item a fixed and explicitly stated name.
-
See Named Tags, Ranges, and JSON for details.