Porovnávané verzie

Kľúč

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

%JSON_ObjectGetValue function


Function

Get Gets a value in a field from the JSON object.

Declaration


Blok kódu
languageesl
themeConfluence
UNIVAL %JSON_ObjectGetValue(
    INT in handle, 
    TEXT in field
 )


Parameters


handleHandle to parent JSON object.
fieldField name


Return value

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

Description

Function get gets a value in a field from the JSON object.

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

Example


Blok kódu
languageesl
themeRDark
 INT _obj
 _obj := %JSON_ObjectFromString('{"Name":"John"}')
 
 TEXT _txt
 _txt := %JSON_ObjectGetValue(_obj, "Name")

 %JSON_FreeObjectHandle(_obj)