Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
JSON.AddValueToObject
Adds a new entry to the object with the given name and value.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
JSON | 14.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "JSON.AddValueToObject"; json; Name...; Value... ) More
Parameters
Parameter | Description | Example |
---|---|---|
json | A JSON text or reference. | {"key": "value"} |
Name... | The name of the Object property. | "length" |
Value... | The text value to add. | "Hello |
Result
Returns JSON code.
Description
Adds a new entry to the object with the given name and value.Same as JSON.AddItemToObject, but calls JSON.CreateString or JSON.CreateNumber automatically for you.
This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.
Please repeat Name and Value parameters as often as you need.
Examples
Add values to an object:
MBS( "JSON.AddValueToObject"; "{}"; "Hello"; "World"; "test"; 123; "a"; "abc")
Example result:
{
"Hello": "World",
"test": 123,
"a": "abc"
}
See also
- JSON.AddBooleanToObject
- JSON.AddFalseToObject
- JSON.AddItemToObject
- JSON.AddNullToObject
- JSON.AddNumberToObject
- JSON.AddStringToObject
- JSON.AddTrueToObject
- JSON.CreateNumber
- JSON.CreateString
Release notes
- Version 14.1
- Added JSON.AddValueToArray and JSON.AddValueToObject functions.
Blog Entries
- New in MBS FileMaker Plugin 14.1
- Neues MBS Plugin 14.1 für Claris FileMaker
- MBS Plugin 14.1 for Claris FileMaker
- MBS FileMaker Plugin, version 14.1pr4
This function checks for a license.
Created 20th February 2024, last changed 20th February 2024