---
schema_version: "1"
id: 7f88ba701b04ad89f2470dc8c12def83a0105a4001f54936b4667aad0d58fa87
title: nameSet
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.3/dw-objects-functions-nameset.md
canonical_url: https://docs.mulesoft.com/dataweave/2.3/dw-objects-functions-nameset
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 2549050432759dd6c1de3a3779cef9508728d3b84545252725a8769f095ab049
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: DataWeave
version: 2.3
---

# nameSet

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

## nameSet(Object): Array<String>

Returns an array of keys from an object.

This method is **Deprecated**. Use `namesOf` from Core module, 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 object to evaluate.</p></td></tr></tbody></table>

### Example

This example returns the keys from the input object.

#### Source

```DataWeave
%dw 2.0
import * from dw::core::Objects
output application/json
---
{ "nameSet" : nameSet({ "a" : true, "b" : 1}) }
```

#### Output

```JSON
{ "nameSet" : ["a","b"] }
```
