---
schema_version: "1"
id: 4425e7fc92ae18c39e9815ef517b85367d5ca5d9f9ea6ec8e441dc4f1819e2b4
title: entriesOf
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.11/dw-core-functions-entriesof.md
canonical_url: https://docs.mulesoft.com/dataweave/2.11/dw-core-functions-entriesof
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 7850beed122b37a956124f7ff6a126e54b6d96393b2824447a17dc1d9dfef808
description: MuleSoft Documentation Site
release: "2.11"
latest: false
---
---
product: DataWeave
version: 2.11
---

# entriesOf

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

## entriesOf<T <: Object>(obj: T): Array<{| key: Key, value: Any, attributes: Object |}>

Returns an array of key-value pairs that describe the key, value, and any attributes in the input
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 describe.</p></td></tr></tbody></table>

### Example

This example returns the key, value, and attributes from the object specified in the variable
`myVar`. The object is the XML input to the `read` function.

#### Source

```DataWeave
%dw 2.0
var myVar = read('<xml attr="x"><a>true</a><b>1</b></xml>', 'application/xml')
output application/json
---
{ "entriesOf" : entriesOf(myVar) }
```

#### Output

```JSON
{
  "entriesOf": [
    {
       "key": "xml",
       "value": {
         "a": "true",
         "b": "1"
       },
       "attributes": {
         "attr": "x"
       }
    }
  ]
}
```

## entriesOf(obj: Null): Null

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

_Introduced in DataWeave version 2.4.0._
