Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

JSON.GetArrayItem

Queries entry from array with given index.

Component Version macOS Windows Linux Server 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

Release notes

Example Databases

Blog Entries

This function checks for a license.

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


JSON.Format - JSON.GetArrayItems