%JSON_ObjectGetObject function


Function

Get object in field from JSON object.

Declaration
INT %JSON_ObjectGetObject(
    INT in handle, 
    TEXT in field
 )
Parameters
handleHandle to parent JSON object.
fieldField name
Return value
Handle to JSON object, must be released by %JSON_FreeObjectHandle.


Description

Funcion get array in field from JSON object.

Exception is thrown if object at index is not array, handle to JSON object is invalid or field does not exists.

Example
 INT _obj
 _obj := %JSON_ObjectFromString(ModuleInfo)
 
 INT _tmp
 _tmp := %JSON_ObjectGetObject(_obj, "client_info")

 %JSON_FreeObjectHandle(_obj)
 %JSON_FreeObjectHandle(_tmp)
Napíšte komentár