MoneyWorks Manual
JSON_AsArray (jsonString)
Result type: array (or not)
Definition: Parses the JSON text and returns the entire result as an associative array. This is equivalent to calling JSON_Parse, JSON_GetArray, and JSON_Free.
Note that associative arrays in MWScript are lexically ordered by the array key, so the array will not necessarily retain the same order as the spatial ordering of the source JSON.
If you pass a non-object JSON string, you will get a simpe type back instead of an array. If you are passing unknown data, be sure to check TypeOf the result before treating as an array.
Availability: available within MWScript handlers in MoneyWors v9.2.3 and later.
See Also:
JSON_AsXML: Convert JSON to XML
JSON_Free: Free a parsed JSON structure or reference to a subobject thereof
JSON_Get: Extract object from parsed JSON
JSON_GetArray: Return a JSON object as an associative array
JSON_Parse: Parse JSON text