---
schema_version: "1"
id: 733634c46bcc6902823aefe4e155750b924e11a638c6cffe8ad5acf0b7d96894
title: nameOf
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.3/dw-types-functions-nameof.md
canonical_url: https://docs.mulesoft.com/dataweave/2.3/dw-types-functions-nameof
source_site: docs.mulesoft.com
content_type: documentation
content_hash: e2985c16339f3899270427a1ff81a92865dbc77023caab29d852d3a2ff73a60e
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: DataWeave
version: 2.3
---

# nameOf

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

## nameOf(Type): String

Returns the name of the input type.

_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>t</p></td><td><p>The type to query</p></td></tr></tbody></table>

### Example

This example shows how `nameOf` behaves with different inputs.

#### Source

```DataWeave
%dw 2.0
output application/json
import * from dw::core::Types
type AArray = Array<String> {n: 1}
type AArray2 = Array<String>
---
 {
     a: nameOf(AArray),
     b: nameOf(AArray2),
     c: nameOf(String)
 }
```

#### Output

```Json
{
   "a": "AArray",
   "b": "AArray2",
   "c": "String"
 }
```
