Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   8.0   8.1    Statistic  


Queries value from JSON path in array of objects.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
JSON 7.1 Yes Yes Yes Yes Yes

MBS( "JSON.GetArrayPathItems"; json; Path { ; AsValue } )


Parameter Description Example value
json A JSON text or reference. "{\"people\":[{\"first\":\"Christian\",\"last\":\"Schmitz\",\"city\":\"Nickenich\"}]}"
Path The path through the json hierarchy as list.
For object, pass name of item to choose. For array pass index.
AsValue Optional
Pass 1 to return as value, e.g. text or number.
Pass 0 (or nothing) to return as JSON.


Returns OK or error.


Queries value from JSON path in array of objects.
The path describes the way through the hierarchy to find the JSON node to return.
Result can be JSON or the value.


Query all test values in objects in array:

MBS("JSON.GetArrayPathItems"; JSON Test::JSON; "test")

Lookup items in array:

MBS( "JSON.GetArrayPathItems"; "[{\"first\":\"Christian\",\"last\":\"Schmitz\",\"city\":\"Nickenich\"}, {\"first\":\"Peter\",\"last\":\"Miller\",\"city\":\"New York\"}]"; "first"; 0 )

Example result:

Lookup item values in array:

MBS( "JSON.GetArrayPathItems"; "[{\"first\":\"Christian\",\"last\":\"Schmitz\",\"city\":\"Nickenich\"}, {\"first\":\"Peter\",\"last\":\"Miller\",\"city\":\"New York\"}]"; "first"; 1 )

Example result:

See also

JSON.GetArrayItemsAsList   -   JSON.GetArraySize

Feedback: Report problem or ask question.

MBS Xojo Chart Plugins