JsonRemoveProperty Function

Action

Removes a property from a JSON object.

Include file

Json.bdh

Syntax

JsonRemoveProperty( in handle   : number,
                    in property : string ): boolean;
Parameter Description
handle Valid handle to a JSON object
property Name of the property in the JSON object (case sensitive)

Return value

  • true if property successfully removed
  • false otherwise

Example

transaction TMain
var
  jsonText   : string;
  jsonObject : number;
begin
  WebParseDataBound(jsonText);
  WebPageUrl("http://mycompany.com/api/jsondata");
  jsonObject := JsonParse(jsonText);
  
  JsonRemoveProperty(jsonObject, "PropertyName");

  JsonFree(jsonObject);
end TMain;