QuickList.JoinJSON
------------------

Joins text in a QuickList as JSON array.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [List](component_List.md) | [13.3](newinversion133.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "QuickList.JoinJSON"; List ) 

**MBS**( **"QuickList.JoinJSON";** /\* Joins text in a QuickList as JSON array. \*/  
**$List**) /\* The reference to the quicklist. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| List | The reference to the quicklist. | $List |

### Result

Returns text or error.

### Description

Joins text in a QuickList as JSON array.  
Values in the QuickList must be valid JSON.  
  
See [JSON.GetArrayItemsAsQuickList](JSONGetArrayItemsAsQuickList.md) function to split JSON to a QuickList.  
### Examples

Try the function by adding three values:

 Let(\[  
list = MBS ( "[QuickList.New](QuickListNew.md)" );  
r = MBS ( "[QuickList.AddValue](QuickListAddValue.md)"; list; "{\\"id\\": 1}" );  
r = MBS ( "[QuickList.AddValue](QuickListAddValue.md)"; list; "{\\"id\\": 2}" );  
r = MBS ( "[QuickList.AddValue](QuickListAddValue.md)"; list; "{\\"id\\": 3}" );  
result = MBS ( "QuickList.JoinJSON"; list );  
r = MBS ( "[QuickList.Release](QuickListRelease.md)"; list )  
\]; result)  
Filter JSON items:

 Set Variable \[ $json ; Value: "\[{\\"id\\": 1},{\\"id\\": 2},{\\"id\\": 3}\]" \]   
\# turn into a list   
Set Variable \[ $list ; Value: MBS ( "[JSON.GetArrayItemsAsQuickList](JSONGetArrayItemsAsQuickList.md)"; $json ) \]   
\#   
\# now loop over entries to filter   
Set Variable \[ $n ; Value: MBS ( "[QuickList.Count](QuickListCount.md)"; $list ) \]   
If \[ $n &gt; 0 \]   
 Loop  
 # get next item  
 Set Variable \[ $n ; Value: $n - 1 \]   
 Set Variable \[ $item ; Value: MBS ( "[QuickList.GetValue](QuickListGetValue.md)"; $list ; $n ) \]   
 #   
 # if meets criteria, then remove it  
 If \[ JSONGetElement ( $item ; "id" ) = 2 \]   
 Set Variable \[ $r ; Value: MBS ( "[QuickList.Remove](QuickListRemove.md)"; $list ; $n ) \]   
 End If  
 #   
 # next  
 Exit Loop If \[ $n ≤ 0 \]   
 End Loop  
End If  
\#   
Set Variable \[ $json ; Value: MBS ( "QuickList.JoinJSON"; $list ) \]   
Show Custom Dialog \[ "after filter" ; $json \]   
\#   
Set Variable \[ $r ; Value: MBS ( "[QuickList.Release](QuickListRelease.md)"; $list ) \]  
### See also

- [JSON.GetArrayItem](JSONGetArrayItem.md)
- [JSON.GetArrayItems](JSONGetArrayItems.md)
- [JSON.GetArrayItemsAsQuickList](JSONGetArrayItemsAsQuickList.md)
- [List.AddValue](ListAddValue.md)
- [List.GetValue](ListGetValue.md)
- [QuickList.Count](QuickListCount.md)
- [QuickList.GetValue](QuickListGetValue.md)
- [QuickList.New](QuickListNew.md)
- [QuickList.Release](QuickListRelease.md)
- [QuickList.Remove](QuickListRemove.md)

### Release notes

- **Version 13.3**
    - Added [JSON.GetArrayItemsAsQuickList](https://www.mbsplugins.eu/JSONGetArrayItemsAsQuickList.shtml) and [QuickList.JoinJSON](https://www.mbsplugins.eu/QuickListJoinJSON.shtml) functions.

### Blog Entries

- [QuickList.JSONArray vs. QuickList.JoinJSON](https://www.mbsplugins.de/archive/2024-08-09/QuickListJSONArray_vs_QuickLis/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 13.3](https://www.mbsplugins.de/archive/2023-07-25/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 13.3 für Claris FileMaker](https://www.mbsplugins.de/archive/2023-07-18/Neues_MBS_Plugin_133_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 13.3 for Claris FileMaker](https://www.mbsplugins.de/archive/2023-07-18/MBS_Plugin_133_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.3pr1](https://www.mbsplugins.de/archive/2023-06-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 31st May 2023 , last changed 14th December 2023

  
[QuickList.JSONArray](QuickListJSONArray.md) - [QuickList.List](QuickListList.md)

[HTML Version](QuickListJoinJSON.shtml)