Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides
New in version: 5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2    Statistic  


Queries value from JSON path in array of objects.

Component: JSON
Version: 7.1
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: 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")

See also

JSON.GetArrayItemsAsList   -   JSON.GetArraySize

Feedback: Report problem or ask question.

MBS Realbasic tutorial videos - Pfarrgemeinde St. Arnulf Nickenich