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 Array

(0) ShareShare
ReportReport
Posted on by 78

Hello community,

 

I do need to filter for a list item in an array with Power Automate Desktop.

The array looks as followed: see screenshot.

I cannot use the index value since the index of the desired item will change for every run.

Also the value cannot be used completely as its content also changes for every run.

What I need is a filter for a part of the value.

Im my case the property_id 85 is the constant value.

So, what I need is to filter for the line with property_id 85 or delete all the other lines.

Any help is very much appreciated.

bacprops.JPG
I have the same question (0)
  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Loop through the array by using for each 

    Then use if condition 

    Inside if write the variable contains your constant value which you need to filter

    Then 

    Parse text by using regex take one line and 

    Use remove text remove all other lines 

    Hope this helps 

    Usha

     

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If this is stored into a text blob initially, you could use Parse text with regular expressions enabled. Parse for { 'property_id': 85[^}]+}

    This will return a single value, that you can then convert to a custom object using Convert JSON to custom object.

     

    There is unfortunately no native action in PA to filter a list. An alternative to getting it via text processing would be looping through the values, as suggested by @UshaJyothi20 .

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • artivo36 Profile Picture
    78 on at

    After having solved this, I need to proceed further to get the "display value" of this particular line staring with "property:_id: 85".

    For this I tried to convert the filtered text back into a custom object, but it fails saying that there is an "unexpected character".

    Any Idea ?

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you had converted it to a custom object before using Parse text, that is actually a bad idea. Please parse it as a JSON value, before converting it. Then convert the output of Parse text.

    If it still doesn't work, try using Replace text to replace a single quote ' with double quotes " before converting it.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard