Skip to main content
Community site session details

Community site session details

Session Id : QNzI/zhE+UqfbQ9evoqOGR
Power Automate - Building Flows
Answered

Filter 2D Array

Like (0) ShareShare
ReportReport
Posted on 22 Nov 2018 10:20:43 by 9

Hi, 

 

Is it possible to filter a 2D array using the "Filter Array" action?

 

I have an array, please see below.

 

[
 {
 "IDNumber": "1",
 "FullName": "Debbie Lob",
 "Department": "Finance",
 "Email": "debbie.lob@example.com"
 },
 {
 "IDNumber": "2",
 "FullName": "John Mills",
 "Department": "Finance",
 "Email": "john.mills@example.com"
 },
 {
 "IDNumber": "3",
 "FullName": "Mary David",
 "Department": "IT",
 "Email": "mary.david@example.com"
 }
]

How can I filter these data? Sample, I would like to get the "FullName" with "IDNumber" equals to "1"? The output should be "Debbie Lob"

These data are stored in an array variable named "NamesArray".

 

Thanks,

Chng

  • Verified answer
    tfhegdbn Profile Picture
    149 on 23 Nov 2018 at 08:09:06
    Re: Filter 2D Array

    Hi @ching29,

     

    I have a way to get the value you want. 

    Use Apply_to_each to iterate over the array and then use to get the properties inside each object. 

    Initialize two variables, an array, and a value that holds the output.

    82.PNG

     

     

    Traverse the array, get the element with the IDNumber equal to 1, and then take the desired value. Then store it in the String variable and finally output it. 

    The red part is Expression, not directly populated in the field.Smiley Happy

    83.PNG84.PNG

  • v-yamao-msft Profile Picture
    on 23 Nov 2018 at 06:07:43
    Re: Filter 2D Array

    Hi @ching29,

     

    Please check the following doc on Filter array action for a reference:

    https://docs.microsoft.com/en-us/flow/data-operations

    Besides, hope the following blogs could be helpful:

    http://johnliu.net/blog/2018/6/do-group-by-in-flow-with-two-simple-elegant-loops

    http://johnliu.net/blog/2018/6/do-bulk-insertupdate-in-microsoft-flow-with-two-simple-elegant-filter-arrays

     

    Best regards,

    Mabel

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

Loading complete