Skip to content

Object Helper

Reference


Object Helper allows you to do various operations on objects.

Categories: [helpers]

Version: 1


Actions

Add Value to the Object by Key

Add value to the object by key if it exists. Otherwise, update the value

Properties

NameTypeControl TypeDescription
Source{}OBJECT_BUILDERSource object to be added or updated
KeySTRINGTEXTKey of the value to be added or updated.
Value TypeINTEGERSELECTType of value to be added or updated.
Value[]ARRAY_BUILDERValue to be added or updated.
ValueBOOLEANSELECTValue to be added or updated.
ValueDATEDATEValue to be added or updated.
ValueDATE_TIMEDATE_TIMEValue to be added or updated.
ValueINTEGERINTEGERValue to be added or updated.
ValueNULLNULLValue to be added or updated.
ValueNUMBERNUMBERValue to be added or updated.
Value{}OBJECT_BUILDERValue to be added or updated.
ValueSTRINGTEXTValue to be added or updated.
ValueTIMETIMEValue to be added or updated.

Add Key-Value Pairs to Object or Array

Add values from list to object or array. If the source is object, the items in the list will be treated as Key-value pairs. If the value is array of objects, key-value pairs will be added to every object in the array.

Properties

NameTypeControl TypeDescription
Type of Initial ObjectINTEGERSELECTType of initial object to be added or updated.
Source[{}]ARRAY_BUILDERSource object to be added or updated
Source{}OBJECT_BUILDERSource object to be added or updated
Key-Value Pairs{}OBJECT_BUILDERKey-Value pairs to be added or updated.

Contains

Checks if the given key exists in the given object.

Properties

NameTypeControl TypeDescription
Input{}OBJECT_BUILDERObject that you’d like to check.
KeySTRINGTEXTKey to check for existence.

Output

Type: BOOLEAN

Delete Key-Value Pair

Deletes a key-value pair in the given object by the specified key. Returns the modified object.

Properties

NameTypeControl TypeDescription
Input{}OBJECT_BUILDERThe object from which to delete the key-value pair.
KeySTRINGTEXTThe key of the key-value pair to delete.

Equals

Compares two objects and returns true if they are equal.

Properties

NameTypeControl TypeDescription
Source{}OBJECT_BUILDERThe source object to compare.
Target{}OBJECT_BUILDERThe target object to compare against.

Output

Type: BOOLEAN