Table of Contents
List of Examples
json_get_field
usageTable of Contents
This is a simple module allowing to retrieve values from a JSON string.
For more complex operations with JSON documents, see the JANSSON module.
Copy field 'field_name' from json object 'json_string' and store it in pvar 'destination'.
Note that the result is the string representation of that JSON filed. For example, if you want to retrieve a field that has a string value, then the result is the value enclosed in quotes. If the field value is a structure, then the result is the string-formatted representation of that structure.
Example 1.1. json_get_field
usage
... json_get_field("{'foo':'bar'}", "foo", "$var(foo)"); xlog("foo is $var(foo)"); ...