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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filtering an array of ...
Power Automate
Unanswered

Filtering an array of objects for a property in the objects

(0) ShareShare
ReportReport
Posted on by 932

I the following array, I need to access all the elements in the array where "QOrder": "1" (there will always only be one element):

 

[
  {
    "@odata.etag""",
    "ItemInternalId""4e0e6adf-b08c-47b9-83e3-24440c1eaad1",
    "Q-ID""21",
    "QGroup""Std1",
    "Q""Why is question3 hard?",
    "QOrder""9"
  },
  {
    "@odata.etag""",
    "ItemInternalId""f7ff0d03-c360-413e-af41-ef720c9a40a5",
    "Q-ID""22",
    "QGroup""Std1",
    "Q""Is question1 present?",
    "QOrder""1"
  },
  {
    "@odata.etag""",
    "ItemInternalId""4f6f2703-cee6-4f96-b8de-1df90fbfcc2b",
    "Q-ID""23",
    "QGroup""Std1",
    "Q""Where is question 2?",
    "QOrder""2"
  }
]
 
I tried this code in a Filter array block, but with no luck:
item()?['QOrder'] is equal to string(1) (I also tried "... is equal to int(1)")
Array address.png
I don't believe I am accessing the value in QOrder correctly.
Would someone please lend a hand? I would be very appreciative; thank you.
Categories:
I have the same question (0)
  • Verified answer
    v-bacao-msft Profile Picture
    on at

     

    Hi @BenDonahue ,

     

    It seems that you have used Parse JSON to parse this array, you can directly use Filter array to filter items.

    105.PNG

     

    Best Regards,

  • BenDonahue Profile Picture
    932 on at

    So, is the output of a Filter array a JSON object? It begins and ends with square brackets, [ ] , so I'm confused why a Parse JSON should be employed and why I am unable to access the data in the array with something like

    body('C-FA-QForQuestionsIndex')?[1]['QOrder']
    Also, thank you for your help, @v-bacao-msft .

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 506 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard