cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IPC_ahaas
Continued Contributor
Continued Contributor

Combine Like Arrays

I have three large Arrays. Each Array has the same objects: "Employee" and "EmployeeID".

 

I want to combine them into one Array. Literally just stacking the Arrays together. No weaving or matching of values, as there will not be duplicates because they all come from different sources:

 

Array 1

 

 

{
  "Employee": "Tony Stark",
  "EmployeeID: "123456"
}
{
  "Employee": "Peter Parker"
  "EmployeeID": "119283"
}

 

 

 

Array 2

 

 

{
  "Employee": "Scott Summers",
  "EmployeeID: "142232"
}
{
  "Employee": "Charles Xavier"
  "EmployeeID": "892209"
}

 

 

 

Array 3

 

 

{
  "Employee": "Eric Brooks",
  "EmployeeID: "992001"
}
{
  "Employee": "Bruce Banner"
  "EmployeeID": "173820"
}

 

 

 

to become:

 

Final Array

 

 

{
  "Employee": "Tony Stark",
  "EmployeeID: "123456"
}
{
  "Employee": "Peter Parker"
  "EmployeeID": "119283"
}
{
  "Employee": "Scott Summers",
  "EmployeeID: "142232"
}
{
  "Employee": "Charles Xavier"
  "EmployeeID": "892209"
}
{
  "Employee": "Eric Brooks",
  "EmployeeID: "992001"
}
{
  "Employee": "Bruce Banner"
  "EmployeeID": "173820"
}

 

 

 

I was hoping to find a way that wouldn't require me to do an Apply to Each, as that will take forever given the number of items in each Array.

1 ACCEPTED SOLUTION

Accepted Solutions
IPC_ahaas
Continued Contributor
Continued Contributor

Figured it out:

 

Compose

union(Array1,Array2,Array3)

View solution in original post

1 REPLY 1
IPC_ahaas
Continued Contributor
Continued Contributor

Figured it out:

 

Compose

union(Array1,Array2,Array3)

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,845)