InsertJSONArray()
Syntax
InsertJSONArray(JSONValue, Array())Description
Insert the specified Array() into the given JSON value. The JSON value will be changed to type #PB_JSON_Array.
Parameters
JSONValue The JSON value. The previous content of the value will be changed to the contant of the Array(). Array() The array to insert into the JSON value.
Return value
None.
Remarks
If the specified Array() has more than one dimension, the JSON value will be filled with a nested array of arrays to represent the multi-dimensional data. See the below example for more details.
Example
Dim Colors.s(3) Colors(0) = "red" Colors(1) = "yellow" Colors(2) = "green" Colors(3) = "blue" If CreateJSON(0) InsertJSONArray(JSONValue(0), Colors()) Debug ComposeJSON(0) EndIf
Example
Dim matrix(2, 2) matrix(0, 0) = 1 matrix(1, 1) = 1 matrix(2, 2) = 1 If CreateJSON(0) InsertJSONArray(JSONValue(0), matrix()) Debug ComposeJSON(0) EndIf
See Also
InsertJSONList(), InsertJSONMap(), InsertJSONStructure(), ExtractJSONArray(), ExtractJSONList(), ExtractJSONMap(), ExtractJSONStructure(),
Supported OS
All