---
schema_version: "1"
id: b2a8d3d0eb6d34aa5f010814f6eb51870645d22232b353c3b1d4620191090fc7
title: valuesOf
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/latest/dw-core-functions-valuesof.md
canonical_url: https://docs.mulesoft.com/dataweave/latest/dw-core-functions-valuesof
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 72504c347a478d270a54ba8dfcc00f5a62e5ec6c279809452b98a60410556bb3
description: MuleSoft Documentation Site
release: "2.13"
latest: true
---
---
product: DataWeave
version: 2.13
is-latest-version: true
---

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