%JSON_ArrayGetLength function


Function

Get length of JSON array.

Declaration


INT %JSON_ArrayGetLength(
    INT in handle
 )


Parameters


handleHandle to JSON array.


Return value

Number of items in JSON array.

Description

Function get length of JSON array.

Exception is thrown if handle to JSON array is invalid.

Example


 INT _arr
 _arr := %JSON_ArrayFromString('[[1,2,3],[4,5,6]]')
 
 INT _length
 _length := %JSON_ArrayGetLength(_arr)

 %JSON_FreeArrayHandle(_arr)