JSON_ArrayGetLength
%JSON_ArrayGetLength function
Function
Returns the number (gets length) of elements in a JSON array.
Declaration
INT %JSON_ArrayGetLength(
INT in handle
)Parameters
handle | Handle to JSON array. |
Return value
The number of items in a JSON array.
Description
The function returns the number of elements in the specified JSON array.
If the handle on the JSON array is invalid, an exception is thrown.
Example
INT _arr
_arr := %JSON_ArrayFromString('[[1,2,3],[4,5,6]]')
INT _length
_length := %JSON_ArrayGetLength(_arr)
%JSON_FreeArrayHandle(_arr)