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 Platform Community / Forums / Power Automate / Filtering an Array cre...
Power Automate
Answered

Filtering an Array created from a Compose Split Action

(0) ShareShare
ReportReport
Posted on by 35
Hi Folks,
 
Not sure what I'm doing wrong, I have a flow that rips the body out of an email to pull relevant information ready to drop into a SharePoint list. 
 
I have the basics mapped out and working as intended, however I am trying to elevate it slightly and remove the last bit of irrelevant guff.

I have a compose action that results in the following output:



I now want to filter that array to only have the rows starting with '[' (The two "Medium" rows displayed above.
 
I have tried Filter Array using item()?['Value'] as the Filter Query, with many variations thereof, however I keep getting an error message that "Value" can't be selected for type String. 

I also tried initializing a variable and setting it with the compose action output, with similar result.
 
I have tried searching the forums and wider with variations on this, with limited success, so I'm wondering if this is even possible. It seems like the compose output array is not being treated as an actual array.
 
Any help will be greatly appreciated.
Categories:
I have the same question (0)
  • Power Platform 1919 Profile Picture
    2,217 Super User 2026 Season 1 on at
    Hi @cjbaguley,
    I think it is doable , we can filter the array, 

    can you please share the inputs and outputs (raw outputs)  of the compose action . just to be sure , can you share the power automate expression used,
    it can be helpful , when giving solution


    you can check this article :
    Extract information from an email with Power Automate
  • Verified answer
    Kalathiya Profile Picture
    2,129 Super User 2026 Season 1 on at
    Hello @cjbaguley
     
    It looks like the issue is simply that the output from your Compose isn’t an array of objects – it’s an array of strings.

    Because of that, Power Automate won’t let you use expressions like item()?['Value'], since each item is already just a string and doesn’t contain any properties.
     
    How to filter only the rows starting with "[". 
     

    In your Filter array action:

    From:

    outputs('Compose') (or whatever your compose step is called)

    Condition:

    Use an expression:

    startsWith(item(), '[')
    
    item() returns the current string in the array, so startsWith() works directly on it.
    
    
    📩 Need more help? Mention @DeveloperAK anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping
     
  • cjbaguley Profile Picture
    35 on at
    Perfect!! 

    Thank you so much for the detailed reply, it really helped me understand the different types of arrays. 
     
    When I put the expression item() into the filter query field, it initially formatted it as "Email Attachment Item", but then on saving and running, changed it to "Current Item" as below, this was the final "aha" moment for my brain to get around it:
     


    Giving me the result I needed:



    Thanks again for sharing your knowledge and expertise!!!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard