---
schema_version: "1"
id: d92e02f550b4a84350c514f93a19a7574471e3933f9bb06a095fc8d83e51832e
title: valuesOf
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.9/dw-core-functions-valuesof.md
canonical_url: https://docs.mulesoft.com/dataweave/2.9/dw-core-functions-valuesof
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 2bce4457e3e98c2956e51e7193d7974a31ab76b89e7df4724a40442e8d356a75
description: MuleSoft Documentation Site
release: "2.9"
latest: false
---
---
product: DataWeave
version: 2.9
---

# valuesOf

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

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

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

_Introduced in DataWeave version 2.3.0._

### 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 of key-value pairs within the input object.

#### Source

```DataWeave
%dw 2.0
output application/json
---
{ "valuesOf" : valuesOf({a: true, b: 1}) }
```

#### Output

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

## valuesOf(obj: Null): Null

Helper function that enables `valuesOf` to work with a `null` value.

_Introduced in DataWeave version 2.4.0._
