---
title: Intersecting sets
framework: appstoreconnectapi
role: article
role_heading: Article
path: appstoreconnectapi/intersecting-sets
---

# Intersecting sets

Return the intersection of two or more arrays treated as sets.

## Overview

Overview Use the intersection() function in the expression of a matchmaking rule to find the common items in arrays. For example, intersection ([[ ‘a’, ‘b’ ], [ ‘b’, ‘c’ ], [ ‘b’, ‘d’]]) returns [ ‘b’ ]. Declaration array intersection(array[array[any]] $sets) Parameters -sets: An array of arrays that the function converts to sets and then intersects with each other. Return value A set that’s the intersect of the set representation of the arrays in sets.

## See Also

### Array functions

- [Converting arrays to sets](appstoreconnectapi/converting-arrays-to-sets.md)
- [Computing numeric differences](appstoreconnectapi/computing-numeric-differences.md)
