%JSON_ObjectRemoveField function


Function

Removes a given field from the JSON object

Declaration
%JSON_ObjectRemoveField(
    INT in handle, 
    TEXT in field
 )
Parameters
handleHandle to parent JSON object.
fieldField name
Return value

None

Description

Function removes a given field from the JSON object

Exception is thrown if handle to JSON object is invalid or field does not exists.

Example
 INT _obj
 _obj := %JSON_ObjectFromString('{"values":[1,2,3]}')
 
 %JSON_ObjectRemoveField(_obj, "values")

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