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 / Modify the Array Value...
Power Automate
Answered

Modify the Array Values During Runtime

(0) ShareShare
ReportReport
Posted on by 30

Hi Everyone,
I am new to Power Automate. 

 

I have a use case i am having an array with 30 fields, initialized it like [ { "Field1":"","Field2":""........."Field30":""}] during the runtime for my first iteration i am getting 30 different values i want to map it like Field1--> Value1, Field2-->Value2, so on and based on these values i want to filter it if any of these values are greater than 90?

For the next iteration the array values should be refreshed and new values needs to be assigned...

Help me here...

Categories:
  • Verified answer
    v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @SalmanShaik 

    According to your description, your data is an array with a direction. And you want to loop the direction in your array.

    For your need , we need to extract the keys in the json object and then loop the array.You can refer to my flow.

    This is my test array :

    vyueyunmsft_0-1700554388964.png

    This is my flow:

    vyueyunmsft_1-1700554404684.png

    (1)The Compose 2 , select , initial variable actions:

    vyueyunmsft_2-1700554506844.png

    xpath(xml(json(concat('{ "root": ', string(outputs('Compose') ), ' }') ))   ,'/root/*')
    xpath(item(), 'name(/*)')
    xpath(item(), concat('/',xpath(item(), 'name(/*)'),'/text()') )[0]
     
    (2)The apply to each action:
    vyueyunmsft_3-1700554597641.png

    (3)The last two actions:

    vyueyunmsft_4-1700554661793.png
    range( 0,length(outputs('Compose_3'))  )
    outputs('Compose_3')?[item()]?['Field']
    outputs('Compose_3')?[item()]?['Value']
     
    The result is as follows:
    vyueyunmsft_5-1700554710440.pngvyueyunmsft_6-1700554725851.png

    And for how to extract keys in the json, i refer to this case :
    Solved: Getting JSON keys in flow - Power Platform Community (microsoft.com)

     

    Best Regards,

    Yueyun Zhang

     
     
     
     

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 423

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 177

Last 30 days Overall leaderboard