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 / Add multiple propertie...
Power Automate
Answered

Add multiple properties to array object dynamically based on object property

(0) ShareShare
ReportReport
Posted on by 1,121

I have a requirement to add multiple properties to an array object based on one of the key value of the same array object. 

 

My Input array is below

{
 "body": [
	{
 "Base64Parts": ["Rick"],
 "NoofParts": 1
 },
 {
 "Base64Parts": ["John","Mark","Roy"],
 "NoofParts": 3
 },
	 {
 "Base64Parts": ["Adam","Steve"],
 "NoofParts": 2
 }
 ]
}

Now based on the maximum value of the "NoofParts" key in the object, I would like to add the same number of properties to each object in the array. Here is my output object.

 

{
 "body": [
	{
 "Base64Parts": ["Rick"],
 "NoofParts": 1,
	 "Part1": "Rick",
	 "Part2": "",
	 "Part3": "",
 },
 {
 "Base64Parts": ["John","Mark","Roy"],
 "NoofParts": 3,
	 "Part1": "John",
	 "Part2": "Mark",
	 "Part3": "Roy",
 },
	 {
 "Base64Parts": ["Adam","Steve"],
 "NoofParts": 2,
	 "Part1": "Adam",
	 "Part2": "Steve",
	 "Part3": "",
 }
 ]
}

 

Please advise. I am looking out for ways without using nested apply to each.

 

Thanks and Regards,

Ramesh Mukka

Categories:
I have the same question (0)
  • Verified answer
    rameshmukka Profile Picture
    1,121 on at

    I was able to get it done with the help of parent-child flows if not Nested Apply to each. It is reasonably fast for as far as 1000 rows I ran. Here are flow snapshots if that can help someone.

     

    Parent Flow

    RameshMukka_0-1705231476649.png

     

    Child Flow

    RameshMukka_1-1705231510824.png

     

    Thanks and Regards,

    Ramesh Mukka

     

     

     

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @RameshMukka,

    Thanks for your sharing.

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard