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

JSON.GetArrayItemsAsList

Queries a list of all array entries.

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

MBS( "JSON.GetArrayItemsAsList"; json )

Parameters

Parameter Description Example value
json A JSON text or reference. "[1,2,3]"

Result

Returns list or error.

Description

Queries a list of all array entries.
Intended for arrays containing text or numbers.

Broken in version 6.0. Please use 6.1. Version 6.5 and newer doesn't add an extra newline any more.

Examples

Query a list from JSON array:

MBS( "JSON.GetArrayItemsAsList"; "[1,2,3]" )

Now a list of strings:

MBS( "JSON.GetArrayItemsAsList"; "[\"Hello\",\"World\",\"Test\"]" )

Now an array with objects:

MBS( "JSON.GetArrayItemsAsList"; "[\"Hello\", \"World\", {\"Hello\": \"test\"}]" )

See also


JSON.GetArrayItem   -   JSON.GetArrayPathItems

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins