Variable.AppendJSON
-------------------

Appends a JSON to the JSON array in the variable.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Variable](component_Variable.md) | [15.2](newinversion152.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Variable.AppendJSON"; Name; JSON ) 

**MBS**( **"Variable.AppendJSON";** /\* Appends a JSON to the JSON array in the variable. \*/  
**$Name**; /\* the name of the variablee.g. "test" \*/   
**$JSON**) /\* The JSON value to add to the array in the variable.e.g. "Hello" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Name | the name of the variable | "test" |
| JSON | The JSON value to add to the array in the variable. | "Hello" |

### Result

Returns new JSON or error.

### Description

Appends a JSON to the JSON array in the variable.  
If the variable doesn't exist, it will be created.  
### Examples

Append a JSON to a variable:

 MBS ("Variable.AppendJSON"; "list"; JSONSetElement ( "{}"; "test" ; 123 ; JSONNumber ))  
<small>  
Example result:   
\[ { "test" : 123 } \] </small>### See also

- [Variable.Append](VariableAppend.md)
- [Variable.AppendValue](VariableAppendValue.md)

### Release notes

- **Version 15.2**
    - Added [Variable.AppendJSON](https://www.mbsplugins.eu/VariableAppendJSON.shtml) and [Variable.PopJSON](https://www.mbsplugins.eu/VariablePopJSON.shtml) functions.

### Blog Entries

- [News in MBS FileMaker Plugin 15.2](https://www.mbsplugins.de/archive/2025-05-13/News_in_MBS_FileMaker_Plugin_1/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 15.2 für Claris FileMaker](https://www.mbsplugins.de/archive/2025-05-06/Neues_MBS_Plugin_152_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 15.2 for Claris FileMaker](https://www.mbsplugins.de/archive/2025-05-06/MBS_Plugin_152_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.2pr4](https://www.mbsplugins.de/archive/2025-04-16/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 15th April 2025 , last changed 15th April 2025

  
[Variable.Append](VariableAppend.md) - [Variable.AppendValue](VariableAppendValue.md)

[HTML Version](VariableAppendJSON.shtml)