cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JeffGimo
Helper II
Helper II

Filter an Object

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.

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User III
Super User III

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
 
 
 
 


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

1 REPLY 1
abm
Super User III
Super User III

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
 
 
 
 


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (64,979)