ParseJSON (Add)

The ParseJSON function can be used to add a new item of data to an initialised JSON object.

Syntax

ParseJSON( InstructionType, Key, ValueType, Path, Item, NewValue );

Parameters

Parameter Name Type Description Optional? Default Value
InstructionType Integer Must be set to the integer 5. No n/a
Key String The key of the intended JSON object. No n/a
ValueType Integer

The new value's data type. Use one of the following:

  • String - for plain text.
  • Number - for an integer.
  • Boolean - for True or False.
  • Null - for NULL.
  • Group - for a group of values. A group consists of comma-separated key-value pairs, all bound within curly braces, such as {"name":"John","age":"35"}.
  • Array - for an array of values. An array consists of comma-separated values, all bound within square brackets, such as ["John","James","Tabitha"].
No n/a
Path String The path of the intended item, such as results No n/a
Item String The name of the new item, such as wakeup. No n/a
NewValue String The value of the new item. No n/a

Output

If successful, the function will return a string consisting of the updated object data.