---
schema_version: "1"
id: 9b93e5ae21454562e6d0a619f0ef68471c3a8d5cd9beaedeecfb6ccb890dcb99
title: nameSet
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/latest/dw-objects-functions-nameset.md
canonical_url: https://docs.mulesoft.com/dataweave/latest/dw-objects-functions-nameset
source_site: docs.mulesoft.com
content_type: documentation
content_hash: b8028f0233550e1251eea60e64e15481977c68f9cf8a33e9fd29999bef7f9758
description: MuleSoft Documentation Site
release: "2.13"
latest: true
---
---
product: DataWeave
version: 2.13
is-latest-version: true
---

# nameSet

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

## nameSet(obj: Object): Array<String>

Returns an array of keys from an object.

_This function is **Deprecated**. Use [dw::Core::namesOf](https://docs.mulesoft.com/dataweave/latest/dw-core-functions-namesof), 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"] }
```
