JSON.GetArrayItemsAsList
------------------------

Queries a list of all array entries.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [JSON](component_JSON.md) | [4.2](newinversion42.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "JSON.GetArrayItemsAsList"; JSON { ; ReturnValues } ) 

**MBS**( **"JSON.GetArrayItemsAsList";** /\* Queries a list of all array entries. \*/  
**$JSON**; /\* A JSON text or reference.e.g. "\[1,2,3\]" \*/   
**$ReturnValues**) /\* Optional; Pass 1 to return values instead of keeping strings in quotes.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| JSON | A JSON text or reference. | "\[1,2,3\]" |  |
| ReturnValues | Pass 1 to return values instead of keeping strings in quotes. | 1 | Optional      Added in version **8.1**. |

### 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](JSONGetArrayItem.md)
- [JSON.GetArrayItems](JSONGetArrayItems.md)
- [JSON.GetArrayItemsAsQuickList](JSONGetArrayItemsAsQuickList.md)

### Release notes

- **Version 14.4**
    - Changed [JSON.GetArrayItemsAsList](https://www.mbsplugins.eu/JSONGetArrayItemsAsList.shtml) to return empty result if JSON is empty.
- **Version 8.3**
    - Fixed crash in [JSON.GetArrayItemsAsList](http://www.mbsplugins.eu/JSONGetArrayItemsAsList.shtml) for undefined values.
- **Version 8.1**
    - Added ReturnValues parameter for [JSON.GetArrayItemsAsList](http://www.mbsplugins.eu/JSONGetArrayItemsAsList.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin, version 14.4pr1](https://www.mbsplugins.de/archive/2024-07-24/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [With JSON in excellent form](https://www.mbsplugins.de/archive/2019-11-16/With_JSON_in_excellent_form/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.3pr1](https://www.mbsplugins.de/archive/2018-06-04/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.1pr1](https://www.mbsplugins.de/archive/2018-02-02/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.5pr8](https://www.mbsplugins.de/archive/2016-11-22/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin Decision Graphs](https://www.mbsplugins.de/archive/2016-11-22/MBS_FileMaker_Plugin_Decision_/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.1pr1](https://www.mbsplugins.de/archive/2016-02-02/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 5.2pr2](https://www.mbsplugins.de/archive/2015-06-08/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 4.2pr4](https://www.mbsplugins.de/archive/2014-04-22/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 5/2020, Seite 18](https://filemaker-magazin.de/neuigkeit/4110-Appetithappen-FMM_202005)

This function checks for a license.

Created 18th August 2014 , last changed 30th January 2018

  
[JSON.GetArrayItems](JSONGetArrayItems.md) - [JSON.GetArrayItemsAsQuickList](JSONGetArrayItemsAsQuickList.md)

[HTML Version](JSONGetArrayItemsAsList.shtml)