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

# nameOf

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

## nameOf(t: Type): String

Returns the name of the input type.

_Introduced in DataWeave version 2.3.0._

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>t</code></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"
 }
```
