This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
action:Set_Variables_to_JSON [2019/06/24 01:45] peternlewis |
action:Set_Variables_to_JSON [2019/06/24 02:07] peternlewis |
||
---|---|---|---|
Line 5: | Line 5: | ||
{{ set-variables-to-json.png?nolink&591x157 | Set Variables to JSON }} | {{ set-variables-to-json.png?nolink&591x157 | Set Variables to JSON }} | ||
- | 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 name or array index to the corresponding values. | + | 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. | For example, with prefix `JSON` and JSON dictionary `{ "first" : "John", "last" : "Smith" }`, the action will set variable `JSONfirst` to `John` and `JSONlast` to Smith. | ||
Line 19: | Line 19: | ||
* Process Nothing (process neither text tokens nor backslash characters) | * Process Nothing (process neither text tokens nor backslash characters) | ||
- | You can select Pretty JSON result mode, which affects the variable values for entries that are themselves JSON containers (See [[manual:JSON]]). | + | You can select Pretty JSON result mode, which affects the variable values for entries that are themselves JSON containers (See the [[manual:JSON]] user manual section). |
- | You can select Strict JSON result mode, which affects the variable values for entries that are plain strings (See [[manual:JSON]]). | + | You can select Strict JSON result mode, which affects the variable values for entries that are plain strings (See the [[manual: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). | And you can optionally have all the non-matching variables with the specified prefix removed (as long as the prefix is not empty). | ||
===== See Also ===== | ===== See Also ===== | ||
+ | |||
+ | See the [[manual:JSON]] user manual section for more details on JSON. | ||
=== Actions === | === Actions === | ||
- | * [[action:Notification|Notification]] | + | * [[action:Set_Dictionary_to_JSON |Set Dictionary to JSON]] |
+ | * [[action:Set_JSON_Value |Set JSON Value]] | ||
* [[:Actions|See all Actions]] | * [[:Actions|See all Actions]] | ||
Line 35: | Line 38: | ||
* [[:Tokens |See all Tokens]] | * [[:Tokens |See all Tokens]] | ||
- | |||