---
schema_version: "1"
id: d2f89f4641c00fe397cddf29125a29c48f0316807e68e843350a70f7006c4b7a
title: intersectionItems
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/latest/dw-types-functions-intersectionitems.md
canonical_url: https://docs.mulesoft.com/dataweave/latest/dw-types-functions-intersectionitems
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 26bfa2b0a1eae54252e6864fa063dd551f80e642b9d8ad06712cb101d05dab43
description: MuleSoft Documentation Site
release: "2.13"
latest: true
---
---
product: DataWeave
version: 2.13
is-latest-version: true
---

# intersectionItems

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

## intersectionItems(t: 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 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 `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"]
}
```
