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 Apps / Combine two JSON Array...
Power Apps
Answered

Combine two JSON Arrays to one

(1) ShareShare
ReportReport
Posted on by

Hi,

Running parallel flows, doing fetch data from different sources, result is in same format which is JSON Array, I also had it in String format.

Tried Join (found out its totally different thing), then used concat and end up having two arrays in one JSON object.

 

Any way to combine two arrays into one JSON array please?

 

 

Two Arrays.

[
 {
 "productcode":"IRECP",
 "FreeStock":"5",
 "ExpectedStock":""
 },
 {
 "productcode":"N10001",
 "FreeStock":"0",
 "ExpectedStock":""
 }
]

[
 {
 "productcode":"EK20",
 "FreeStock":"1.00",
 "ExpectedStock":"20.00"
 },
 {
 "productcode":"EL50",
 "FreeStock":"-8.00",
 "ExpectedStock":"299.00"
 }
]

 

Desired Result would be one array containing both arrays.

[
 {
 "productcode":"IRE10030CP",
 "FreeStock":"5",
 "ExpectedStock":""
 },
 {
 "productcode":"NIK10001",
 "FreeStock":"0",
 "ExpectedStock":""
 },

 {
 "productcode":"EK219SV150",
 "FreeStock":"1.00",
 "ExpectedStock":"20.00"
 },
 {
 "productcode":"ELTHMC50",
 "FreeStock":"-8.00",
 "ExpectedStock":"299.00"
 }
]

 

 

Thanks 

Categories:
I have the same question (0)
  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @u4jaanus 

     

    Try just

     

     

    union(array_1,array_2)

     

     

    from a Compose action. See if it works.

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @u4jaanus 

     

    We can confirm that 

    union(array_1,array_2)

     

    works properly.

     

    See this example.

     

    yvio3uwrf.png

     

    assume array_1 and array_2 are in your format.

     

    You would define the merging of arrays "array_1" and "array_2" as follows:

     

    v01ujhdqwgsaz.gif

     

     

     

    In our example we only have one item in our json schema "title" but it would be still applicable in your case or for any similar case.

     

    Here is the result (see very bottom of the below screenshot - notice both arrays are merged into one array):

     

    vujhdqwgsaz.gif

    Hope this helps. 

     

  • u4jaanus Profile Picture
    on at

    Thank you. Union is what i needed. Is there a source which lists all functions supported in Flow?

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard