cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dsab81
Microsoft
Microsoft

Append two Array's

Hi.. I need to append two array's into one.

 

e.g.

Array 1 :

{
  "Table1": [
    {
      "UserID""abc@gmail.com"
    },
    {
      "UserID""def@gmail.com"
    }
 
  ]
}
 

Array 2 :

{
  "Table1": [
   
{
      "UserID""ghi@gmail.com"
    },
    {
      "UserID""jkl@gmail.com"
    }
  ]
}
 
Expected Result :
 

Array Union :

{
  "Table1": [
    {
      "UserID""abc@gmail.com"
    },
    {
      "UserID""def@gmail.com"
    },
{
      "UserID""ghi@gmail.com"
    },
    {
      "UserID""jkl@gmail.com"
    }
  ]
}
 
 
How can i get the above result ?
1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @dsab81,

 

If you can retrieve the Table1 property items (for instance via some parse json actions) you could use a union function:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#u...

 

union(outputs('Compose_-_Array_1'),outputs('Compose_-_Array_2'))

 

union_example.png

View solution in original post

1 REPLY 1
Expiscornovus
Super User
Super User

Hi @dsab81,

 

If you can retrieve the Table1 property items (for instance via some parse json actions) you could use a union function:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#u...

 

union(outputs('Compose_-_Array_1'),outputs('Compose_-_Array_2'))

 

union_example.png

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,258)