User Tools

Site Tools


syntax:functions:jsonvalue

jsonvalue(JSON_text, JSONPath)

Extracts a single value or a JSON object/array from a node specified by JSONPath.

If a result is a JSON array it's stripped of the wrapping square brackets in order to make further splitting (e.g. using Split delimited text into columns or Split delimited text into rows) more convenient.

Example

Expression Result Note
jsonvalue('{“customer”:{“ID”:345}}', 'customer.ID') 345 Single scalar value
jsonvalue('{“customer”:{“ID”:345, “name”:“Plain Jane”}}', 'customer') {“ID”:345, “name”:“Plain Jane”} JSON object
jsonvalue('{“customerIDs”:[345,346,347]}', 'customerIDs') 345,346,347 JSON array stripped of brackets

See also

syntax/functions/jsonvalue.txt · Last modified: 2019/10/31 00:13 by dmitry