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 Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (61,925)