%dw 2.0
import * from dw::core::Objects
output application/json
---
{ "nameSet" : nameSet({ "a" : true, "b" : 1}) }
DataWeave
nameSet
nameSet(obj: Object): Array<String>
Returns an array of keys from an object.
This function is Deprecated. Use dw::Core::namesOf, instead.
Parameters
Name | Description |
---|---|
|
The object to evaluate. |
Example
This example returns the keys from the input object.
Source
Output
{ "nameSet" : ["a","b"] }
JSON