Contact Free trial Login

nameSet

nameSet(Object): Array<String>

Returns an array of keys from an object.

Parameters

Name Description

obj

The object to evaluate.

Example

This example returns the keys from the input object.

Source

%dw 2.0
import * from dw::core::Objects
output application/json
---
{ "nameSet" : nameSet({ "a" : true, "b" : 1}) }

Output

{ "nameSet" : ["a","b"] }

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.