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.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
JSON.GetArrayItem
Queries entry from array with given index.
| Component | Version | macOS | Windows | Linux | Server | 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
- JSON.CreateDoubleArray
- JSON.GetArrayItems
- JSON.GetArrayItemsAsList
- JSON.GetArrayPathItems
- JSON.GetArraySize
Example Databases
- CURL/Email/IMAP Email List
- CURL/Email/IMAP Email
- CURL/WebServices/WeatherBit.io test
- JSON/JSON Order Parsing
- JSON/JSON Test
- Mac and iOS/Machine Learning/Core Image Detection
- Mac only/ImageCapture/Camera Import
- Win Only/WindowsML
Blog Entries
- MBS FileMaker Plugin, version 10.5pr1
- With JSON in excellent form
- Face detection via CoreImage in FileMaker
FileMaker Magazin
Release notes
- Version 10.5
- Added flags for JSON.GetArrayItem, so result can be JSON, reference or now value.
- Version 10.4
- Added JSON.GetArrayItems function to work with huge JSON arrays.
- Version 8.3
- Fixed crash in JSON.GetArrayItemsAsList for undefined values.
- Version 8.1
- Added ReturnValues parameter for JSON.GetArrayItemsAsList function.
Created 18th August 2014, last changed 27th September 2020
JSON.Format - JSON.GetArrayItems
Feedback: Report problem or ask question.
Links
MBS Xojo Chart Plugins