Datastructures JSON Reference
This page describes built-in Touch Portal Datastructures JSON actions, events and states. For other automation options, see the Touch Portal Capability Model.
Datastructures JSON Actions
Get Json Array Size
Action settings
Json
The JSON text to read from.
Path
The comma separated path to the array. Example: users or data, 0, items. If the JSON root is an array, leave the path empty to get the root array size.
Value
The value to save the array size in.
Default
The default value to use when the path is not found or is not an array.
NotFound
What to do when the path is not found or is not an array.
This action allows you to get the size of a JSON array using a comma separated path and store the result in a Value.
Action
4.7
Available since
Get Value From Json
Action settings
Json
The JSON text to read from.
Path
The comma separated path to the value. Example: user, name or users, 0, name. If the JSON root is an array, start with the index. Example: 0, name
Value
The value to save the result in.
Default
The default value to use when the path is not found.
NotFound
What to do when the path is not found.
This action allows you to get a value from a JSON structure using a comma separated path and store the result in a Value.
Action
4.7
Available since
Put Value In Json
Action settings
Json
The JSON text to change. If empty, a new JSON object will be created.
Path
The comma separated path where the value should be placed. Example: user, name or users, 0, name.
InputValue
The value to put in the JSON.
ValueType
The type of the value.
OutputValue
The value to save the resulting JSON in.
This action allows you to put a value in a JSON structure using a comma separated path and store the resulting JSON in a Value.
Action
4.7
Available since
Remove Value From Json
Action settings
Json
The JSON text to change.
Path
The comma separated path to remove. Example: user, name or users, 0. If the JSON root is an array, start with the index. Example: 0, name
OutputValue
The value to save the resulting JSON in.
This action allows you to remove a key or array item from a JSON structure using a comma separated path and store the resulting JSON in a Value.
Action
4.7
Available since