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

# 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"
 }
```
