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.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3    Statistic  

JSON.GetArrayPathItems

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 } )

Parameters

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.
"people¶0¶last"
AsValue Optional
Pass 1 to return as value, e.g. text or number.
Pass 0 (or nothing) to return as JSON.

Result

Returns OK or error.

Description

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.

Examples

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.




Links
MBS Xojo PDF Plugins