Returns a list of key value pair object describing the object entries

Example
%dw 2.0
import dw::core::Objects
---
Objects::entrySet({a: true, b: 1})
Output
[{key: "a", value: true}, {key: "b", value: 1}]

Functions

EntrySet

entrySet(T)

MergeWith

mergeWith(T, V)

Overrides the source with the target object so that the result with contain all the properties from the target plus the properties on the source that are not declared on the target

Example
%dw 2.0
import mergeWith from dw::core::Objects
---
{a: true, b: 1} mergeWith {a: false, c: "Test"}
Output
{a: false, b: 1 , c: "Test"}

mergeWith(Null, T): T

Helper method to make mergetWith null friendly

mergeWith(T, Null): T

Helper method to make mergetWith null friendly

NameSet

nameSet(Object): Array<String>

Returns the list of key names of an object

Example
%dw 2.0
import dw::core::Objects
---
Objects::nameSet({a: true, b: 1})
Output
["a","b"]

ValueSet

valueSet({ K?: V }): Array<V>

Returns the list of key values of an object

Example
%dw 2.0
import dw::core::Objects
---
Objects::nameSet({a: true, b: 1})
Output
[true,1]