XenoGuard Documentation

Set

Actions » Windows » Network » JSON » Set 

The action Set assigns the value that is based on the path or key provided from the JSON content.


[-] Hide
  1. Open the Windows node in the Workspace Explorer.
  2. Open the Network node.
  3. In the JSON node, select the Set action.

Parameters:

The action has the following input parameters:


name Description
JSON Content
The target JSON content.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
Key/Path
The path or key of the value in JSON content.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
New Value
The new value of the path or key in the JSON content

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]

Results:

The action returns the following results:


name
description
Result
The updated JSON content.

Allowed Context Scope [Fixed]
Allowed Context Types [Variable, Parameter]

Example 1 (Update key value of a local JSON file):

This example retrieves a JSON file from a directory and derives the key value from its content. The key value named name is then compared to a created local variable named EmployeeName with Text as data type. When the values are the same, another key named status is changed from enabled to disabled. Once set, the content is then stored in a local JSON file and the Result is then output via Message Box.


See other JSON operations:

Get
Parse String
Parse File