jsonExtract(json,xpath)¶
Definition¶
String jsonExtract(String json, String xpath)
Description¶
Walks through JSON to extract a particular value. If the value is a const then the string representation is returned, if the value is a data structure (list or map) then the value is returned as legal JSON (i.e. quotes are properly escaped). Returns null if (a) the supplied json is not legal JSON, (b) either supplied string is null, or (c) the xpath does not resolve to an existing value in the supplied JSON.
Parameter Definition¶
Name | Type | Description |
---|---|---|
json | String | Must be legal JSON, ex: 123 or |
xpath | String | The path to supplied value, with each 'step' separated by period (.), To index into arrays use the zero based integer offset. To index into maps use the key value |