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
Answered

Filter an Object

(1) ShareShare
ReportReport
Posted on by 221

I parsed my input and here's what it looks like:

 

image.png

Now, I want to filter the output to get the items that has true values.

For this example, I'm looking to get

GraphixManga, Mystery and SciFiFantasy.

 

I tried searching the same problem but I only see filter array options. Please help.

Categories:
  • Verified answer
    abm abm Profile Picture
    33,004 Most Valuable Professional on at

    Hi @JeffGimo 

     

    Not the straight forward method but you could do this way. Here it is

     

    image.png

     

    Above I used the below expression

     

    split(replace(replace(string(outputs('Compose')),'{',''),'}',''),',')
     
    This stage we have set of array values. Next we need to iterate the array and find the true values. So for this we need an Apply to Each loop and map the output from Compose2 above. See below for details.
     
    image.png
     
    Above Compose 3 expression I used is
     
    bool(last(split(items('Apply_to_each'),':')))
     
    Then under the Append to array variable the expression is as follows:
     
    first(split(items('Apply_to_each'),':'))
     
    Final results are as follows:
     
    image.png
     
     
     
     
  • Gyllentid Profile Picture
    894 on at

    hi @abm I am having trouble with this as I try to filter on null values. All the null values gets passed through anyway. I wonder if it's due to the / symbols... Ideas on what to do?

  • StephenBlack Profile Picture
    9 on at

    replace(item('this_loop'),'\"','') worked for me.

    Then I did 

    json(concat('{',replace(item('this_loop'),'\"',''),'}'))

    to put the items in to a variable object array.

    It turned 

    {a:1,b:2,c:3}

    into 

    [{a:1},{b:2},{c:3}]

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard