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

Merge/union 2 arrays

(1) ShareShare
ReportReport
Posted on by
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,073 on at
    Well, please share your flow.
  • VM-31030826-0 Profile Picture
    on at
    I have 2 basic variable of type array defined with the value specified above (Array1, Array2)
  • VictorIvanidze Profile Picture
    13,073 on at
    No flow - no help.
  • Suggested answer
    takolota1 Profile Picture
    4,974 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

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

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard