---
title: INTERSECTION
url: https://www.tines.com/docs/formulas/functions/intersection/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/docs/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# INTERSECTION

*[View on tines.com](https://www.tines.com/docs/formulas/functions/intersection/)*

Returns the intersection between two arrays.

**Categories:** Arrays

## Syntax

```
INTERSECTION(array1, array2)
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "array1": [
      1,
      2,
      3
    ],
    "array2": [
      1,
      2
    ]
  }
}
```

Formula:

```
INTERSECTION(my_action.array1, my_action.array2)
```

Output:

```json
[
  1,
  2
]
```

## Sample actions

```json
{
  "standardLibVersion": "13",
  "actionRuntimeVersion": "2",
  "agents": [
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "array1": [
            1,
            2,
            3
          ],
          "array2": [
            1,
            2
          ]
        }
      },
      "position": {
        "x": 1635,
        "y": 2355
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "INTERSECTION",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "value": "=INTERSECTION(my_action.array1, my_action.array2)"
        }
      },
      "position": {
        "x": 1635,
        "y": 2430
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 1
    }
  ],
  "diagramNotes": []
}
```
