web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Filtering arrays

(0) ShareShare
ReportReport
Posted on by

I have two arrays with objects..

 

{

"Name": abc,

"Title": abc

}

 

Im using the filter function to filter out the differences between the two arrays (side question but if you have a better way of doing this, let me know.. which power automate would have the "except" function.. cause the "intersection" function is awesome..).. 

 

What Im seeing is if ALL objects in the arrays dont match, its not filtered out.. I would like to ONLY filter based on the NAME.. but will need the other data in the array for later on. 

 

Thanks in advance

Categories:
I have the same question (0)
  • grantjenkins Profile Picture
    11,063 Moderator on at

    I'm not sure if this is what you are after. Also I'm not sure how you could only use the Name to filter on. What if you had two objects with the same name, but different Titles?

     

    Anyway, here is an example that takes two arrays of objects and combines them and removes duplicate objects. It just uses the union expression passing in both of the arrays.

     

    The Compose Combined No Duplicates action uses the following expression:

    union(variables('Array1'),variables('Array2'))

     

    grantjenkins_0-1665802860824.png

     

    The end result is:

    [
     {
     "Name": "AAA",
     "Title": "AAA"
     },
     {
     "Name": "BBB",
     "Title": "BBB"
     },
     {
     "Name": "CCC",
     "Title": "CCC"
     },
     {
     "Name": "AAA",
     "Title": "BBB"
     },
     {
     "Name": "EEE",
     "Title": "EEE"
     }
    ]

     

    Again, not sure if this is what you were after, but might help with part of the process (hopefully).

     

  • grantjenkins Profile Picture
    11,063 Moderator on at

    After reading your question again, I think this post might be what you are after.

     

    Efficient Union, Except And Intersect – Great Method - DamoBird365

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard