---
schema_version: "1"
id: 4831aac62b3c8aaafc644b45499c59ea395a54daaf664d416e573a065e0aaceb
title: nameOf
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/latest/dw-types-functions-nameof.md
canonical_url: https://docs.mulesoft.com/dataweave/latest/dw-types-functions-nameof
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 90ad2f4037b93d32cc9498e4f046027bc2837096a3864baa605c5478da3f05a5
description: MuleSoft Documentation Site
release: "2.13"
latest: true
---
---
product: DataWeave
version: 2.13
is-latest-version: true
---

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