JSON.Add
Adds a key-value pair to a JSON object.
Syntax
JSON.Add *JSON_to_add_value_to "key" value
Returns
reference to JObject object
Arguments
| Name | Required | Type | Description |
|---|---|---|---|
JSON to add value to | Yes | a reference to JObject object. | |
key | Yes | Any text e.g. "Hello, World!" | You will be using this key to refer to this value, like { "key": value } |
value | Yes | a value of type LiteralValue |
Possible errors
- Provided value was not able to be added to the JSON object.
On a running server
Use serhelp JSON.Add to inspect the reference generated by your installed SER version.