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

# 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.6/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] }
```
