Intersection function in Power Automate

In this exercise, we will learn how to use the intersection function of power automate. The intersection function is used to get the common elements of the two arrays and returns the distinct values only in the resultant array by removing the duplicates.
So, we can use the intersection function to get the unique values from the array.

Let’s create an array variable with name FirstArray, as shown in the image below.

intersection function in Power Automate

Let’s create another array variable with name SecondArray, as shown in the image below.

intersection function in Power Automate

To see the output, we are using the Compose action of power automate. Use the dynamic expression given below to get the unique values from the array.

Power Automate

intersection(variables('FirstArray'),variables('SecondArray'))

We can see the output in the compose action that only the common elements are available in the output and duplicates are removed.

intersection function in Power Automate