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 / Extract values from ar...
Power Automate
Unanswered

Extract values from array without looping

(0) ShareShare
ReportReport
Posted on by 12

I have an array like this in a power automate flow:

[
  {
    "fileUri""1YS000.xml"
  },
  {
    "fileUri""ZJBGF.xml"
  }
]
I need to extract the value of each element so that the resulting output is ["1YS000.xml","ZJBGF.xml"]
I can do that using an 'apply to all' loop but that takes several minutes. Is there a better way to do this? I was trying to use Select, but I just got the exact same output.
Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    You can do that with a Data Select action if you switch its mapping into Text mode.  You can then grab the value from that key and add it to the resulting array without a key.

    image.png

    image.png

  • fero Profile Picture
    12 on at

    Apologies, but I'm not sure I understand the "grab the value from that key and add it to the resulting array without a key". Here's what I did originally. Do you mean that I take "item()?['fileUri']" and add it to an array variable?

    fero_0-1705522788675.png

     

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    The Data Select will automatically return an array. So after switching to text mode just insert the fileUri dynamic content.  You don't need any of the other JSON syntax you are using. Loop at Map in the data select screenshot I posted.

  • fero Profile Picture
    12 on at

    Aha! I was missing half the picture you posted originally. This worked like a charm! Thanks so much @Pstork1 !

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard