Contact Us 1-800-596-4880

valueSet

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

Returns an array of the values from key-value pairs in an object.

This function is Deprecated. Use dw::Core::valuesOf, instead.

Parameters

Name Description

obj

The object to evaluate.

Example

This example returns the values from the input object.

Source

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

Output

{ "valueSet" : [true,1] }