Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

%JSON_ArrayGetArray function


Function

Get array at Returns an array on the specified index from a JSON array.

Declaration


Blok kódu
languageesl
themeConfluence
INT %JSON_ArrayGetArray(
    INT in handle, 
    INT in index
 )


Parameters


handleHandle to parent the JSON array.
indexIndex of the array


Return value
Handle to tot the JSON array, must be released by allowed by %JSON_FreeArrayHandle.


Description

Funcion get array at The function returns an array on the specified index from the JSON array.

Exception is thrown if object at index If the item type is not an array, the handle to on the JSON array is invalid, or the index is out of rangeinvalid, an exception is thrown.

Example


Blok kódu
languageesl
themeRDark
 INT _arr
 _arr := %JSON_ArrayFromString('[[1,2,3],[4,5,6]]')
 
 INT _tmp
 _tmp := %JSON_ArrayGetArray(_arr, 1)

 %JSON_FreeArrayHandle(_tmp)
 %JSON_FreeArrayHandle(_arr)