json.toVars
json.toVars() Function
• Introduced in version 1.5.5
Creates variables from a from a JSON Object. The names of the variables are the keys of the object, while the variables are assigned the values of the object.
Usage
json.toVars(jobj)
json.toList(jobj, prefix)
json.toList(jobj, prefix, suffix)
Parameters
jobj
- The json Object.prefix
- The prefix to add to the name of each variable. Defaults to an empty string "".suffix
- The suffix to add to the name of each variable. Defaults to "".
Examples
[h: json.toVars(json.set("{}", "a", 1, "b", 2, "c", 3))]
[r: a] [r: b] [r: c]
Returns
1 2 3