Action group: JSON
The action adds a key-value pair to the JSON if such key does not already exist, and updates the value if the key does
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
JSON | The JSON to which the object will be added | Robin.JSON | Yes | |
JSONPath | JSONPath describes the path to the JSON element. It always starts with a „/“ character. The corresponding keys are listed below. Indexes are used to access array elements (counting starts from 0). For example, the path „/key/1“ indicates that we are trying to access the second element of the array, which is accessible by the key „key“. | Robin.String | Yes | |
Value | The object to be added to the JSON as a value. Valid object types: collection, map, string, number, boolean. An error will occur if other types are used. Note: any value can be passed as a string. | Robin.Object | No | |
Results | ||||
Processed JSON | JSON containing new value. | Robin.JSON |
None.
Create a JSON and set its value: "firstName": "Joe"
Use the "Create a JSON", "Set value" actions.
The program robot completed successfully. JSON is created and the required value is set in it.