Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
JSON.GetArrayItemsAsList
Queries a list of all array entries.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
JSON | 4.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "JSON.GetArrayItemsAsList"; json { ; ReturnValues } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
json | A JSON text or reference. | "[1,2,3]" | |
ReturnValues | Available in MBS FileMaker Plugin 8.1 or newer. Pass 1 to return values instead of keeping strings in quotes. |
1 | Optional |
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
Release notes
- Version 14.4
- Changed JSON.GetArrayItemsAsList to return empty result if JSON is empty.
- Version 8.3
- Fixed crash in JSON.GetArrayItemsAsList for undefined values.
- Version 8.1
- Added ReturnValues parameter for JSON.GetArrayItemsAsList function.
Blog Entries
- MBS FileMaker Plugin, version 14.4pr1
- With JSON in excellent form
- MBS FileMaker Plugin, version 8.3pr1
- MBS FileMaker Plugin, version 8.1pr1
- MBS FileMaker Plugin, version 6.5pr8
- MBS FileMaker Plugin, version 6.1pr1
- MBS FileMaker Plugin, version 5.2pr2
- MBS Filemaker Plugin, version 4.2pr4
FileMaker Magazin
This function checks for a license.
Created 18th August 2014, last changed 30th January 2018