---
schema_version: "1"
id: 31386532ffb7a7107d4ebfe2e7cfc8b19ea6e08c9b16275c969f18ff23a07729
title: namesOf
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.3/dw-core-functions-namesof.md
canonical_url: https://docs.mulesoft.com/dataweave/2.3/dw-core-functions-namesof
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 30393b95d9f4ba4fd4dfe45d27448b1024fa68b959e7aa008d24da630162f045
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: DataWeave
version: 2.3
---

# namesOf

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

## namesOf(Object): Array<String>

Returns an array of strings with the names of all the keys within the given object.

_Introduced in DataWeave 2.3.0. Supported by Mule 4.3 and later._

### 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 key-value pairs within the input object.

#### Source

```DataWeave
%dw 2.0
output application/json
---
{ "namesOf" : namesOf({ "a" : true, "b" : 1}) }
```

#### Output

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