Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

How to filter unique JSON data?

(0) ShareShare
ReportReport
Posted on by 313

Hello Everyone,

I am trying to filter JSON data using one column(UniqueId).
Suppose I have this type of JSON data:

[
{Name: "User1", UniqueId: "UID1"},
{Name: "User2", UniqueId: "UID2"},
{Name: "User3", UniqueId: "UID1"}
]

I want this JSON data to be in this form:

[
{Name: "User1", UniqueId: "UID1"},
{Name: "User2", UniqueId: "UID2"}
]

 As I already have UID1 on the 1st row, so I don't want to add any further rows with the same UniqueId.

Thanks

  • takolota1 Profile Picture
    4,896 Super User 2025 Season 1 on at
    Re: How to filter unique JSON data?

    New more efficient template for getting unique JSON records based on set columns / fields here: https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Get-Unique-Records/td-p/2191533

  • Verified answer
    v-xiaochen-msft Profile Picture
    on at
    Re: How to filter unique JSON data?

    Hi @sayyedkohler ,

     

    I did a test for you.

    vxiaochenmsft_0-1636682151975.png

    vxiaochenmsft_1-1636682187345.png

    item().UniqueId
    vxiaochenmsft_2-1636682220302.png
    union(body('Select'),body('Select'))
    vxiaochenmsft_3-1636682281604.png

    1.

    item().UniqueId
     
    2.
    items('Apply_to_each').UniqueId
     
    3.
    body('Filter_array')[0]
     
    vxiaochenmsft_4-1636682318634.png

     

    vxiaochenmsft_5-1636682346669.png

     

    Best Regards,

    Wearsky

     

     

  • MarvinBangert Profile Picture
    1,922 Most Valuable Professional on at
    Re: How to filter unique JSON data?

    Hey @sayyedkohler 

    did you try to use the action "Filter array"? Your data is in an array format, so you should be able to filter this with this action.

     

    Does this help you? Otherwise please give me some more information.

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

    Blog: Cloudkumpel

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1