Porovnávané verzie

Kľúč

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

%JSON_ArrayGetObject function


Function

Get object at Gets the object on the specified index from the JSON array.

Declaration


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


Parameters


handleHandle to parent JSON array.
indexIndex of the object.


Return value
Handle to JSON object, must be released by allowed by %JSON_FreeObjectHandle.


Description

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

Exception is thrown if object at index is not If the item type is not an object, 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('[{"Name":"John"}]')
 
 INT _obj
 _obj := %JSON_ArrayGetObject(_arr, 1)

 %JSON_FreeObjectHandle(_obj)
 %JSON_FreeArrayHandle(_arr)