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 / Choose one JSON object...
Power Automate
Answered

Choose one JSON object from multiple based on specific value

(0) ShareShare
ReportReport
Posted on by 93

The below example is the output from an Initialize Variable step. How do I choose just the object whose file_type equals M4A?

 

[
 {
 "id": "value",
 "meeting_id": "value",
 "recording_start": "2022-02-01T20:09:15Z",
 "recording_end": "2022-02-01T20:09:24Z",
 "file_type": "M4A",
 "file_extension": "M4A",
 "file_size": 141805,
 "play_url": "URL",
 "download_url": "URL",
 "status": "completed",
 "recording_type": "audio_only"
 },
 {
 "id": "value",
 "meeting_id": "value",
 "recording_start": "2022-02-01T20:09:15Z",
 "recording_end": "2022-02-01T20:09:24Z",
 "file_type": "TIMELINE",
 "file_extension": "JSON",
 "file_size": 953,
 "download_url": "URL",
 "status": "completed",
 "recording_type": "timeline"
 },
 {
 "id": "value",
 "meeting_id": "value",
 "recording_start": "2022-02-01T20:09:15Z",
 "recording_end": "2022-02-01T20:09:24Z",
 "file_type": "MP4",
 "file_extension": "MP4",
 "file_size": 167422,
 "play_url": "URL",
 "download_url": "URL",
 "status": "completed",
 "recording_type": "shared_screen_with_speaker_view"
 }
]
Categories:
I have the same question (0)
  • DanielGAJohnson Profile Picture
    93 on at

    This is the result I want:

     

    {
     "id": "value",
     "meeting_id": "value",
     "recording_start": "2022-02-01T20:09:15Z",
     "recording_end": "2022-02-01T20:09:24Z",
     "file_type": "M4A",
     "file_extension": "M4A",
     "file_size": 141805,
     "play_url": "URL",
     "download_url": "URL",
     "status": "completed",
     "recording_type": "audio_only"
     }
  • Svenny Profile Picture
    153 on at

     The simplest way would be to use the action "Filter array", with the array you are working with as an input.

    In the condition part of the action, specify "file_type" field on the left side, set the condition to "is equal to" and in the right field specify "M4A" as your target.

    The output would be an array containing only items with file type M4A.

    Reference: https://docs.microsoft.com/en-us/power-automate/data-operations#use-the-filter-array-action

  • DanielGAJohnson Profile Picture
    93 on at

    @Svenny thanks for the reply!

     

    I'm having trouble specifying the "file_type" field. In the reference you have it shows the field already as dynamic content, but it's not showing in my dynamic content tool tip. Is there a way with an expression to specify the "file_type" field?

     

    Filter Array.PNG

  • Verified answer
    Svenny Profile Picture
    153 on at

    No problem!

     

    Yes, you can type this into the expression tab in order to reference the "file_type" field, since dynamic content is not available:

     

     

    item()?['file_type']

     

     

     

    You can also use the "Parse Json" action to make the values in your array variable available as dynamic content for you to work with.

     

    This requires you to specify a schema. The simplest way to do this is to paste your data as example data, and have Power Automate generate it for you.

     

  • DanielGAJohnson Profile Picture
    93 on at

    That worked. Thanks @Svenny !

  • Svenny Profile Picture
    153 on at

    @DanielGAJohnson  Great to hear! Glad I could help.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard