Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »



Function: jsonToItems()

Converts a block JSON data to a set of attributes. This can be useful if you need to extract the values from within JSON data.

Syntax

jsonToItems(JSON String, JSON Path, Lenient)

ArgumentTypeDescription
JSON StringStringJSON string to be converted to attribute values.
JSON PathString

The JSON Path expression is evaluated against the data provided by the JSON String. It determines which elements are extracted from the JSON.

Defaults to “$” which matches the entire document. 

Lenientboolean

Lenient is a flag which determines whether to pass the JSON String leniently. Defaults to false.

Error rendering macro 'excerpt-include' : No link could be created for 'JSON Node'.

Example

jsonToItems("{data:{status:'success'}}", "$..status", true)

Generates 

TBC
  • No labels