Skip to main content

Object

DELETEPROP

​​❌ Cannot be used in filter queries

Removes the specified properties (keys) from the input JSON object and returns the updated object.

Syntax‌‌

DELETEPROP(object, key1, key2, ..., keyN)

NameTypeDescription
objectmandatoryCan be any valid expression that resolves to an object.
key1mandatorykey1, key2,... are 1 to 100 object property names. Can be any valid expression that resolves to a text value that specifies the JSON object property name.

GETPROP

​​❌ Cannot be used in filter queries

Gets the property value of the object and converts it to the requested type (e.g., integer, text, boolean).

Syntax‌‌

GETPROP(object, key, type)

NameTypeDescription
objectmandatoryCan be any valid expression that resolves to an object.
keymandatoryCan be any valid expression that resolves to a text value that specifies the JSON object property name.
typemandatoryCan be any valid expression that resolves to a text value that specifies the type of the object property. Can be either "integer", "decimal", "boolean", "text", or "object"

MERGEOBJECTS

​​❌ Cannot be used in filter queries

Merges the properties of the objects and returns the merged object. Merging is done from left to right, first, object1 and object2 are merged, then the merged object is merged with object3, and so on.

Syntax‌‌

MERGEOBJECTS(object1, object2, ..., objectN)

NameTypeDescription
object1mandatoryCan be any valid expression that resolves to an object.
object2mandatoryobject2, object3,... are 2 to 99 objects. Can be any valid expression that resolves to an object.

OBJECT

​​❌ Cannot be used in filter queries

Creates a new JSON object using the key-value pairs. If no key-value pair provided, it creates an empty object. If a key evaluates to an empty string, it does not add that property to the JSON object.

Syntax‌‌

OBJECT(key1, value1, key2, value2, ..., keyN, valueN)

NameTypeDescription
key1optionalCan be any valid expression that resolves to a text value that specifies the JSON object property name.
value1optionalCan be any valid expression. The value of this expression will be assigned as the value of the JSON object property specified by key1.
key2optionalCan be any valid expression that resolves to a text value that specifies the JSON object property name.
value2optionalCan be any valid expression. The value of this expression will be assigned as the value of the JSON object property specified by key2.

SETPROP

​​❌ Cannot be used in filter queries

Adds the new properties and values (key-value pairs) or updates the existing ones of the input JSON object and returns the updated object. If the property already exists then updates its value; otherwise adds it to the JSON object.

Syntax‌‌

SETPROP(object, key1, value1, key2, value2, ..., keyN, valueN)

NameTypeDescription
objectmandatoryCan be any valid expression that resolves to an object.
key1mandatoryCan be any valid expression that resolves to a text value that specifies the JSON object property name.
value1mandatoryCan be any valid expression. The value of this expression will be assigned as the value of the JSON object property specified by key1.
key2optionalCan be any valid expression that resolves to a text value that specifies the JSON object property name.
value2optionalCan be any valid expression. The value of this expression will be assigned as the value of the JSON object property specified by key2.