%JSON_ArrayGetValue function


Function

Gets the value in the specified item from the JSON array.

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

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

Description

The function returns the value in the specified item from the JSON array.

If the handle on the JSON array is invalid or the index is invalid, an exception is thrown.

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

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