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

# isKeyType

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

## isKeyType(t: Type): Boolean

Returns `true` if the input is the Key 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 check.</p></td></tr></tbody></table>

### Example

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

#### Source

```DataWeave
%dw 2.0
import * from dw::core::Types
type AKey = Key
output application/json
---
{
   a: isKeyType(AKey),
   b: isKeyType(Key),
   c: isKeyType(Boolean),
}
```

#### Output

```Json
{
  "a": true,
  "b": true,
  "c": false
}
```
