---
schema_version: "1"
id: 6c1a85f08661794b22de3d9831562772a828ec74de1349d60f8c70e61babf6c1
title: valueSet
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.12/dw-objects-functions-valueset.md
canonical_url: https://docs.mulesoft.com/dataweave/2.12/dw-objects-functions-valueset
source_site: docs.mulesoft.com
content_type: documentation
content_hash: d9641b43256f65973378d0001b472c5ed8874ccbfc7b4adf957ba0a01c3bf514
description: MuleSoft Documentation Site
release: "2.12"
latest: false
---
---
product: DataWeave
version: 2.12
---

# valueSet

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## 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](https://docs.mulesoft.com/dataweave/2.12/dw-core-functions-valuesof), instead._

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>obj</code></p></td><td><p>The object to evaluate.</p></td></tr></tbody></table>

### Example

This example returns the values from the input object.

#### Source

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

#### Output

```JSON
{ "valueSet" : [true,1] }
```
