Hello,
I have 2 arrays resulting from 2 different 'Select' operation as below , I need to combine the output into single array for using it in looping later for each unique value in "Apply to each" step.
I tried using "append to array variable ", but it does not merge the elements inside array.
Can you please let me know what I am missing here ?
Thank you
Thank you @grantjenkins .
@Sivaperumal31 You can use the union expression to combine any number of arrays. Below is an example of how it works.
//Will combine all arrays into a single array and remove any duplicate values
union(array1, array2, array3, array...)
See example below where I have three Selects similar to yours where we then use a union expression to combine them and remove any duplicate values.
My three Selects have the following output. Note that "MY" Is listed twice so one of them will be removed when we apply the union expression.
Compose uses the following expression to combine (union) the Selects and remove duplicate values.
union(body('Select_1'), body('Select_2'), body('Select_3'))
This would give the output below.
Apply to each uses the output from Compose so it iterates over each of the items in the array.
----------------------------------------------------------------------
If I've answered your question, please mark the post as Solved.
If you like my response, please consider giving it a Thumbs Up.
Thank you @v-liwei-msft , It worked , I missed "Apply to each " before .
I assume I have to use another "Apply for each " if I have to combine 3rd Array ?
Guess no other way to combine multiple array(3 or more ) other than using "apply to each" for every array to be appended .