util.JSONObject.delete()

util.JSONObject.delete() deletes the specified element from the JSON object by its index.

Syntax

CALL util.JSONObject.delete(index)

Parameters

index

an index of the object member to be removed

Usage and examples

MAIN
 DEFINE jo util.JSONObject
	LET jo = util.JSONObject.create()
	CALL jo.insert( "k1", "v1" )
	CALL jo.insert( "k2", "v2" )
	DISPLAY util.JSON.stringify(jo)
	CALL jo.delete(1)
	DISPLAY util.JSON.stringify(jo)
END MAIN

 

Contact Us

Privacy Policy

Copyright © 2025 Querix, (UK) Ltd.