%dw 2.0
output application/json
---
{ "valuesOf" : valuesOf({a: true, b: 1}) }
DataWeave
valuesOf
valuesOf<K, V>(obj: { (K)?: V }): Array<V>
Returns an array of the values from key-value pairs in an object.
Introduced in DataWeave version 2.3.0.
Parameters
Name | Description |
---|---|
|
The object to evaluate. |
Example
This example returns the values of key-value pairs within the input object.
Source
Output
{ "valuesOf" : [true,1] }
JSON
valuesOf(obj: Null): Null
Helper function that enables valuesOf
to work with a null
value.
Introduced in DataWeave version 2.4.0.