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

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