The Set Variables to JSON (v9.0+) action lets you set a set of variables from a JSON dictionary.
The action will take a specified prefix and a JSON container (dictionary or array) and will set variables based on the prefix and the field names or array indices to the corresponding values.
For example, with prefix JSON
and JSON dictionary { "first" : "John", "last" : "Smith" }
, the action will set variable JSONfirst
to John
and JSONlast
to Smith.
The prefix should either be empty, or be a valid variable name with optional trailing space.
You can control what text processing happens in the JSON field by selecting one of these options from the Gear Menu:
You can select Pretty JSON result mode, which affects the variable values for entries that are themselves JSON containers (See the JSON user manual section).
You can select Strict JSON result mode, which affects the variable values for entries that are plain strings (See the JSON user manual section).
And you can optionally have all the non-matching variables with the specified prefix removed (as long as the prefix is not empty).
See the JSON user manual section for more details on JSON.