CreateEmptyObject

Purpose:

Create an empty object to store properties and values: [objectName('propertyName')]

Category:

JSON

Syntax:

CreateEmptyObject [object var]

object var

Variable to store the object properties and values.

Example:

CreateEmptyObject [MyObjectVar]
SetVar [MyObjectVar('name')] "John"

SetVar [MyObjectVar('age')] 43


LoadJSON

Purpose:

Load a JSON file from a URL synchronously into a variable

Category:

JSON

Syntax:

LoadJSON "file URL" [result object var]
file URL

URL to retieve the JSON data.

result object var

Variable to store the object properties and values from the JSON data.

Example:

LoadJSON "https://jsonplaceholder.typicode.com/todos/4" [myvar]

SetVar [regtitle] [myvar('title')]

SetVar [regid] [myvar('id')]

AlertBox "JSON values:" "Title: [regtitle], Id: [regid]" ""


ParseJSON

Purpose:

Parse a string (written in JSON format) and return an object with properties and values: [objectName(property)]

Category:

JSON

Syntax:

ParseJSON "JSON string" [result object var]

JSON string

Data string in JSON format.

result object var

Variable to store the object properties and values from the JSON data.

Example:

ParseJSON "{ 'name':'John', 'age':30, 'city':'New York'}" [myvar]


StringifyJSON

Purpose:

Stringify an object with properties and values: [objectName(property)] to a string written in JSON format

Category:

JSON

Syntax:

StringifyJSON [source object var] [result var]
source object var

Object variable to stringify with data in JSON format.

result var

Variable to store the result string.

Example:

StringifyJSON [myobjectvar] [myvar]