---
schema_version: "1"
id: 3b817690aed041f1903a060696df91827e3cc11d8b9b6d379fe8b208c63130e8
title: intersectionItems
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.3/dw-types-functions-intersectionitems.md
canonical_url: https://docs.mulesoft.com/dataweave/2.3/dw-types-functions-intersectionitems
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 833e7d0963dd5a58cabf48950aae3fee43fb142f27a2704d78ccfc7b2668550d
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: DataWeave
version: 2.3
---

# intersectionItems

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

## intersectionItems(Type): Array<Type>

Returns an array of all the types that define a given Intersection type. This function fails if the
input is not an Intersection 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 `intersectionItems` behaves with different inputs. Note that the `AType`
variable defines an Intersection type `{name: String} & {age: Number}` by using an `&` between the
two objects.

#### Source

```DataWeave
%dw 2.0
import * from dw::core::Types
type AType = {name: String} & {age: Number}
output application/json
---
{
   a: intersectionItems(AType)
}
```

#### Output

```Json
{
  "a": ["Object","Object"]
}
```
