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 Automate
Suggested Answer

Merge/union 2 arrays

(1) ShareShare
ReportReport
Posted on by Microsoft Employee
I am working on a power automate flow and I have 2 Array variables/Compose
 
Array 1
[
     {  
     user: userA,
     var111: 20
    },
    {  
     user: userB,
     var111: 30
    },
    
]
 
 
Array 2
[
     {  
     user: userA,
     var222: 30
    },
    {  
     user: userC,
     var222: 30
    },
    
]


output array should be InnerJoin/union on common key "user" and also fill gaps ,  combine all users and make count=0 if not available in other array (check UserB in below array)
 
Output Array = 
[
     {  
     user: userA,
     var111: 20 
     var222: 30,
    },
    {  
     user: userB,
     var111: 30,
     var222: 0
    },
    {  
     user: userC,
     var111: 0,
     var222: 30
    },
    
]
Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,079 on at
    Well, please share your flow.
  • VM-31030826-0 Profile Picture
    Microsoft Employee on at
    I have 2 basic variable of type array defined with the value specified above (Array1, Array2)
  • VictorIvanidze Profile Picture
    13,079 on at
    No flow - no help.
  • Suggested answer
    takolota1 Profile Picture
    4,980 Moderator on at
    If you want to merge json arrays efficiently you will either need...
    (Non-premium) XML: https://tachytelic.net/2022/07/power-automate-merge-array/

    (Premium) Azure Functions: https://medium.com/@takolota/power-automate-upsert-json-array-dfa937d800be

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