JSON Actions
Parse JSON string.
Property | Value | Description |
---|---|---|
json* | text, expression, variable | the JSON string to parse |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
jsonData = '{"name":"Test User","phone":"555-555-1234"}' parsedData = parseJSON(jsonData) log(parsedData['name']) log(parsedData['phone'])
Serialize Object, Record, Array, etc. as a JSON string.
Property | Value | Description |
---|---|---|
item* | expression, variable | the Object, Record, Arrays, etc to serialize |
indent | boolean, expression, variable | format/indent JSON result |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
record = createRecord(false) record.name = "Test User" record.phone = "555-555-1234" log(record) # displays - {name=Test User, phone=555-555-1234} jsonStr = toJSON(record, false) log(jsonStr) # displays - {"name":"Test User","phone":"555-555-1234"}