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 / Get value out of array
Power Automate
Answered

Get value out of array

(0) ShareShare
ReportReport
Posted on by 314
I have below array in Power Automate flow
[
  "RedApple=Fruit_Apple",
  "GreenApple=Fruit_Apple",
  "YellowBanana=Fruit_Banana",
  "BlueCar=LonnerCar',
]
What is the expression I can use to get the value of out my array?
For example:
1. Search String 'Red'  return 'Fruit_Apple'
2. Search String 'Yellow'  return 'Fruit_Banana'
3. Search String 'Blue'  return 'LonnerCar'
 
Thanks!
Categories:
  • Verified answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @usaman45 

     

    Try like this 

    Nived_Nambiar_0-1712169235940.png

     

    Nived_Nambiar_1-1712169249224.png

     

    Here i am searching for Red.

     

    Nived_Nambiar_2-1712169281404.png

     

    This is output expression > 

    last(split(first(body('Filter_array')),'='))
     
    see the result when searched for red. 
    Nived_Nambiar_3-1712169325246.png

     

    Hope it helps !

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    If you need to query the array multiple times, it may be worth the extra effort to convert the array to an object.

    You can then simply query the array within an expression.

     

    Chriddle_0-1712217203078.png

    Select

    From

    outputs('Fruits')

     Map Key

    first(split(item(),'='))

    Map Value

    last(split(item(),'='))

     

    Compose

    first(json(replace(string(body('Select')), '},{', ',')))

    The output is an object like this:

    Chriddle_1-1712217405479.png

     

    You can access the above object as follows:

    Compose 2

    outputs('Compose')['YellowBanana']

     Chriddle_2-1712217453152.png

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard