%JSON_ArrayGetValue function


Function

Get value at index from JSON array.

Declaration
UNIVAL %JSON_ArrayGetValue(
    INT in handle, 
    INT in index
 )
Parameters
handleHandle to parent JSON array.
indexIndex of value
Return value

Value of type BOOL, INT, REAL or TEXT, or invalid value.

Description

Function get value at index from JSON array.

Exception is thrown if object at index is not value, handle to JSON array is invalid or index is out of range.

Example
 INT _arr
 _arr := %JSON_ArrayFromString('["IPESOFT"]')
 
 TEXT _txt
 _txt := %JSON_ArrayGetValue(_arr, 1)

 %JSON_FreeArrayHandle(_arr)
Napíšte komentár