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

# entrySet

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

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

_This function is **Deprecated**. Use [dw::Core::entriesOf](https://docs.mulesoft.com/dataweave/2.9/dw-core-functions-entriesof), 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 <code>Object</code> to describe.</p></td></tr></tbody></table>

### Example

This example returns the key, value, and attributes in the object specified in the variable `myVar`.

#### Source

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

#### Output

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