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 Automate
Answered

Help Filtering Array

(0) ShareShare
ReportReport
Posted on by 21

I'm having a brain fart and cant quite figure out how to get my Filter Array function to work on this json:

 

{
"data": [
[
{
"groups": [],
"label": "Raw Signals",
"summary_current_period": 16439,
"summary_previous_period": 31579
},
{
"groups": [],
"label": "Filtered Events",
"summary_current_period": 708,
"summary_previous_period": 839
},
{
"groups": [],
"label": "Security Incidents",
"summary_current_period": 0,
"summary_previous_period": 0
},
{
"groups": [],
"label": "Escalations",
"summary_current_period": 0,
"summary_previous_period": 0
},
{
"groups": [],
"label": "Unusual",
"summary_current_period": 1,
"summary_previous_period": 0
},
{
"groups": [],
"label": "Notifications",
"summary_current_period": 170,
"summary_previous_period": 197
}
]
],
"params": {
"customer_code": "REDACTED",
"end_time": "2022-09-23 23:59:59+00:00",
"format": null,
"report_types": [
"ActivitySummary"
],
"sites": [],
"start_time": "2022-09-17 00:00:00+00:00"
},
"report_id": "REDACTED",
"request_end_time": "2022-09-23T14:37:26.198084+00:00",
"request_start_time": "2022-09-23T14:33:51.152314+00:00",
"status": "ACTIVE"
}

 

My filter array is where 

body('Parse_JSON')?['data']?[0]?[0]?['label'] is equal to Raw Signals, but its not showing me just the raw signals data, its showing me all of those labels. I want to extract the summary_current_period data for each label.

 

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,472 Most Valuable Professional on at

    Hi @PatrickJMcLean,

     

    I would use a Filter Array action for this. Use your source data and make sure you select the below in the From

    [0]['data'][0]

     

    In my example below I used a variable. But I assume in your case it is probably a response from a HTTP action or something similar?

     

    In the filter criteria you can use 

    item()?['label']

    is equal to Raw Signals

     

    filterarray_0data0.png

     

  • PatrickJMcLean Profile Picture
    21 on at

    I am using an HTTP action, so I put body('HTTP')[0]['data'][0] and got "Object properties can only be selected by names".

     

    Removed the first 0 and it worked. Thank you. So it was body('HTTP')['data'][0]

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 331 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 203 Most Valuable Professional

Last 30 days Overall leaderboard