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

The Action 'Get Json Array Size' as visible in Touch Portal.

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
Icon showing the Touch Portal category this item belongs to.

4.7

Available since
Touch Portal Logo used to accompany the version number this item was available from.
Green Windows Logo indicating this Action is supported on Windows.
Green macOS Logo indicating this Action is supported on macOS.
Green Linux Logo indicating this Action is supported on Linux.

Get Value From Json

The Action 'Get Value From Json' as visible in Touch Portal.

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
Icon showing the Touch Portal category this item belongs to.

4.7

Available since
Touch Portal Logo used to accompany the version number this item was available from.
Green Windows Logo indicating this Action is supported on Windows.
Green macOS Logo indicating this Action is supported on macOS.
Green Linux Logo indicating this Action is supported on Linux.

Put Value In Json

The Action 'Put Value In Json' as visible in Touch Portal.

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
Icon showing the Touch Portal category this item belongs to.

4.7

Available since
Touch Portal Logo used to accompany the version number this item was available from.
Green Windows Logo indicating this Action is supported on Windows.
Green macOS Logo indicating this Action is supported on macOS.
Green Linux Logo indicating this Action is supported on Linux.

Remove Value From Json

The Action 'Remove Value From Json' as visible in Touch Portal.

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
Icon showing the Touch Portal category this item belongs to.

4.7

Available since
Touch Portal Logo used to accompany the version number this item was available from.
Green Windows Logo indicating this Action is supported on Windows.
Green macOS Logo indicating this Action is supported on macOS.
Green Linux Logo indicating this Action is supported on Linux.