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

Community site session details

Session Id :
Power Automate
Unanswered

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:
I have the same question (0)
  • Verified answer
    abm abm Profile Picture
    32,856 Most Valuable Professional on at
    Re: Filter an Object

    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
    Re: Filter an Object

    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
    Re: Filter an Object

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard