Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3   10.4   10.5    Statistic    FMM    Blog  

JSON.GetArrayItem

Queries entry from array with given index.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
JSON 2.7 Yes Yes Yes Yes Yes
MBS( "JSON.GetArrayItem"; json; index { ; Flags } )   More

Parameters

Parameter Description Example Flags
json A JSON text or reference. "[1,2,3]"
index The index of the array element. 0
Flags Pass various flags.
0 returns as JSON text.
1 returns as JSON reference number.
2 returns as value.
Default is 0.
0 Optional

Result

Returns JSON code.

Description

Queries entry from array with given index.
Index is zero based.

Examples

Create array and pick second item:

Let(
[
j = MBS( "JSON.CreateDoubleArray"; 1; 2; 3);
r = MBS( "JSON.GetArrayItem"; j; 1 )
];
r)

See also

Example Databases

Blog Entries

Release notes

Created 18th August 2014, last changed 27th September 2020


JSON.Format   -   JSON.GetArrayItems

Feedback: Report problem or ask question.




Links
MBS FileMaker tutorial videos