util.JSONObject.insert()

util.JSONObject.insert() adds an element to the JSON object (= a key:value pair).

Syntax

CALL util.JSONObject.insert("key", value)

Parameters

key

the key part of a new key:value pair

value

the value part of a new key:value pair

Usage and examples

The key:value pair added by util.JSONObject.insert() must be assigned to a variable of the util.JSONObject datatype.

The value of the key:value pair can be a simple string or numeric value as well as a complex value of RECORD or DYNAMIC ARRAY datatype.

 

If a JSON object has a key:value pair of the specified key already, the value of this pair will be changed:

A key:value pair can be returned with util.JSONObject.get().

A key:value pair can be removed with util.JSONObject.remove().

 

 

Contact Us

Privacy Policy

Copyright © 2025 Querix, (UK) Ltd.