Contact Free trial Login

nameSet

nameSet(Object): Array<String>

Returns an array of keys from an object.

This method is Deprecated. Use namesOf from Core module, instead.

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"] }

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub