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

# 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._
