JavaScript.SetPropertyJSON
--------------------------

Sets property value using JSON.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [JavaScriptWebKit](component_JavaScriptWebKit.md) | [12.2](newinversion122.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "JavaScript.SetPropertyJSON"; JavaScriptContext; PropertyName; JSONString ) 

**MBS**( **"JavaScript.SetPropertyJSON";** /\* Sets property value using JSON. \*/  
**$JavaScriptContext**; /\* The reference number of the javascript context.e.g. $Context \*/   
**$PropertyName**; /\* The name of the property.e.g. "FirstName" \*/   
**$JSONString**) /\* The new value as JSON Text.e.g. "{}" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| JavaScriptContext | The reference number of the javascript context. | $Context |
| PropertyName | The name of the property. | "FirstName" |
| JSONString | The new value as JSON Text. | "{}" |

### Result

Returns OK or error.

### Description

Sets property value using JSON.  
Great way to move lots of data as JSON to the JavaScript environment.  
### Examples

Set property via JSON:

 Set Variable \[ $r ; Value: MBS ("JavaScript.SetPropertyJSON"; $$Context ; "test"; "{\\"Hello\\": \\"World\\"}") \]  
### See also

- [JavaScript.GetProperty](JavaScriptGetProperty.md)
- [JavaScript.GetPropertyJSON](JavaScriptGetPropertyJSON.md)
- [JavaScript.SetProperty](JavaScriptSetProperty.md)

### Release notes

- **Version 12.2**
    - Added [JavaScript.CallFunction](https://www.mbsplugins.eu/JavaScriptCallFunction.shtml), [JavaScript.GetPropertyJSON](https://www.mbsplugins.eu/JavaScriptGetPropertyJSON.shtml) and [JavaScript.SetPropertyJSON](https://www.mbsplugins.eu/JavaScriptSetPropertyJSON.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin 12.2](https://www.mbsplugins.de/archive/2022-06-09/MBS_FileMaker_Plugin_122/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 12.2 für Claris FileMaker](https://www.mbsplugins.de/archive/2022-05-17/Neues_MBS_Plugin_122_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 12.2 for Claris FileMaker](https://www.mbsplugins.de/archive/2022-05-17/MBS_Plugin_122_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.2pr5](https://www.mbsplugins.de/archive/2022-05-04/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 3th May 2022 , last changed 9th February 2023

  
[JavaScript.SetProperty](JavaScriptSetProperty.md) - [Keychain.AddGenericPassword](KeychainAddGenericPassword.md)

[HTML Version](JavaScriptSetPropertyJSON.shtml)