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

# metadataOf

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

## metadataOf(Type): Object

Returns metadata that is attached to the given 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 check.</p></td></tr></tbody></table>

### Example

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

#### Source

```DataWeave
%dw 2.0
import * from dw::core::Types
type AType = String {format: "YYYY-MM-dd"}
output application/json
---
{
   a: metadataOf(AType)
}
```

#### Output

```Json
{
  "a": {"format": "YYYY-MM-dd"}
}
```
