Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Adds a boolean value to an array.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
JSON | 6.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
json | A JSON text or reference. | [false,true,false] |
Name... | The name of the key. | "Hello" |
Value... | The boolean to be added. Pass 1 for true and 0 for false. |
1 |
Returns JSON code or error.
Add a boolean to object:
Set Variable [$json; Value:MBS( "JSON.Parse"; "{\"Hello\": \"World\"}" )]
Set Variable [$json; Value:MBS( "JSON.AddBooleanToObject"; $json; "test"; 1)]
Show Custom Dialog [$json; MBS("JSON.Format"; $json)]
Set Variable [$r; Value:MBS( "JSON.Release"; $json)]
Add a value:
MBS( "JSON.AddBooleanToObject"; "{}"; "test"; 1 )
Example result:
{
"test": true
}
This function is free to use.
Created 5th January 2016, last changed 5th June 2021