JavaScript Object Notation (JSON) statements validate, return, set, and remove values in JSONObjects and JSONArrays.
Note: The following statements are available in the Add Statement dialog box. Additional statements can be called on instances of JSONObjects and JSONArrays, but are not available in the Add Statement dialog box.
| Statement | Description |
|---|---|
| JSONArrayGetValue | Returns the value of an index from a JSONArray or a default value if the index is out of range. |
| JSONArraySetValue | Sets or adds the value to an index in a JSONArray and returns the modified array. |
| JSONCanParseAsArray | Returns True or False to indicate if an expression contains a JSONArray. |
| JSONCanParseAsObject | Returns True or False to indicate if an expression contains a JSONObject. |
| JSONIsValid | Returns True or False to indicate if an expression is valid JSON. |
| JSONNewArray | Creates and returns an empty JSONArray. |
| JSONNewObject | Creates and returns an empty JSONObject. |
| JSONObjectGetValue | Returns the value of a property from a JSONObject or a default value if the property name is not found. |
| JSONObjectSetValue | Sets or adds the value to a property name in a JSONObject and returns the modified object. |
| JSONParse | Returns a value after parsing an object using JSON syntax. |
The following statements can be called directly on an instance of a JSONArray class.
| Statement | Description |
|---|---|
| GetAllValues | Returns values from a JSONArray as a user array. |
| GetLength | Returns the number of values in a JSONArray. |
| GetValue - JSONArray | Returns the value of an index in a JSONArray or a default value if the index is out of range. |
| InsertAt | Inserts a value at an index in a JSONArray and pushes all values after it in the array back one position. |
| Pop | Returns the last value in a JSONArray and then removes it. |
| Push | Appends a value to the end of a JSONArray. |
| RemoveAt | Removes the value at an index in a JSONArray and returns True or False to indicate if it was successfully removed. |
| SetValue - JSONArray | Sets or adds a value to an index in a JSONArray. |
| ToString - JSONArray | Converts a JSONArray type to a string and returns the string. |
The following statements can be called directly on an instance of a JSONObject class.
| Statement | Description |
|---|---|
| GetPropertyNames - JSONObject | Returns the property names for a JSONObject. |
| GetValue - JSONObject | Returns the value of a property in a JSONObject or a default value if the property name is not found. |
| HasProperty - JSONObject | Returns True or False to indicate if a property name exists in a JSONObject. |
| RemoveProperty | Removes a property from a JSONObject and returns True or False to indicate if it was successfully removed. |
| SetValue - JSONObject | Sets or adds a value to a property name in a JSONObject. |
| ToString - JSONObject | Converts a JSONObject type to a string and returns the string. |