> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reelevant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Array Intersection

> Find common elements between two arrays

## Overview

The `intersection` transformation finds the common elements between two arrays, returning only elements that appear in both.

## Syntax

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
intersection(<variable 1>, <variable 2>)
```

## Parameters

| Parameter    | Type  | Required | Description  |
| ------------ | ----- | -------- | ------------ |
| `variable 1` | array | Yes      | First array  |
| `variable 2` | array | Yes      | Second array |

## Examples

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
intersection(<variable 1>, <variable 2>)
```

<Note>
  Returns an array containing only the elements that appear in both arrays.
</Note>
