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

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