JSONListValues

Lists the values in JSON data for an element specified by an object name, an array index, or a path.

Format 

JSONListValues ( json ; keyOrIndexOrPath )

Parameters 

json - any text expression or field that contains a JSON object or array.

keyOrIndexOrPath - any text expression or field that specifies a JSON object name (key), an array index, or a path. See Working with the JSON functions.

Data type returned 

text

Originated in version 

16.0

Notes 

  • Each returned value, except the last, ends with a carriage return.

Example 1 

Gets the values of all objects at the root of the JSON object.

JSONListValues( "{ \"a\" : 11, \"b\" : 22, \"c\" : 33 }" ; "" ) returns 11¶22¶33.

Example 2 

From the Example JSON data stored in the $$JSON variable, gets the values of all elements in the array in the "product" object.

JSONListValues ( $$JSON ; "bakery.product" ) returns

{"category":"Breads","id":"FB1","name":"Donuts","price":1.99,"special":true,"stock":43}
{"category":"Cakes","id":"FB2","name":"Chocolate Cake","price":22.5,"special":true,"stock":23}
{"category":"Breads","id":"FB3","name":"Baguette","price":3.95,"special":true,"stock":34}

Example 3 

From the Example JSON data stored in the $$JSON variable, gets the values of all elements in the first "product" object in the array.

JSONListValues ( $$JSON ; "bakery.product[0]" ) returns
Breads¶FB1¶Donuts¶1.99¶1¶43.