JSON.ReplaceItemInObject
------------------------

Replaces an item in an object with new item.

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

MBS( "JSON.ReplaceItemInObject"; JSON; Name; json2 ) 

**MBS**( **"JSON.ReplaceItemInObject";** /\* Replaces an item in an object with new item. \*/  
**$JSON**; /\* A JSON text or reference.e.g. {"key": "value"} \*/   
**$Name**; /\* The name of the Object property.e.g. "key" \*/   
**$json2**) /\* The JSON text for the item.e.g. "Hello" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| JSON | A JSON text or reference. | {"key": "value"} |
| Name | The name of the Object property. | "key" |
| json2 | The JSON text for the item. | "Hello" |

### Result

Returns JSON code.

### Description

Replaces an item in an object with new item.  
### Examples

Replace key with new Value:

 MBS ( "JSON.ReplaceItemInObject"; "{\\"key\\":\\"value\\"}"; "key"; "\\"Hello\\"" )  
<small>  
Example result:   
{ "key" : "Hello" } </small>### See also

- [JSON.Replace](JSONReplace.md)
- [JSON.ReplaceItemInArray](JSONReplaceItemInArray.md)

### Blog Entries

- [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 4.3pr8](https://www.mbsplugins.de/archive/2014-09-02/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

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

This function checks for a license.

Created 26th August 2014 , last changed 11st December 2016

  
[JSON.ReplaceItemInArray](JSONReplaceItemInArray.md) - [JSON.Search](JSONSearch.md)

[HTML Version](JSONReplaceItemInObject.shtml)