Combine JSON Arrays

Combine JSON Arrays

Description

Join two JSONs files by a common column to combine data efficiently into a unified JSON.

Input Arguments

Input ArgumentTypeDescriptionRequired?Advanced Option?Default
Main JSONString in JSON formatMain JSON which has to be supplemented with the data from the Second JSON✔️-
Combine Property NameStringThe property name used as a key to match and combine items from both arrays.✔️-
Second JSONString in JSON formatSecond JSON contains the data to be join.✔️-
Second JSON PropertyStringOptional: A different property name in the second JSON to match against.✔️-

Output

ResponseTypeDescription
JSON ResponseJSON arrayThe combined JSON array as an object/array.
BodyObjectThe full response body containing the combined JSON under the JSON property.

Power Automate Examples

Combine JSON Arrays

We are working with two JSON datasets that share a common field: "Pet". We will join the two datasets based on this field. The first JSON:

Simple JSON with four pets
[
{
"Pet": "Dog",
"Identifier": "1006",
"First name": "Eats",
"Last name": "A Lot"
},
{
"Pet": "Cat",
"Identifier": "1010",
"First name": "Likes",
"Last name": "To Scratch"
},
{
"Pet": "Cat",
"Identifier": "1002",
"First name": "Furry",
"Last name": "Kitty"
},
{
"Pet": "Duck",
"Identifier": "1002",
"First name": "Dagobert",
"Last name": "Swimmy"
}
]

The second JSON:

Simple JSON with four pets
 [
 {
   "Pet": "Dog",
   "Age": 5,
   "Color": "Golden",
   "Owner": "John"
 },
 {
   "Pet": "Cat",
   "Age": 3,
   "Color": "Tabby",
   "Owner": "Emily"
 },
 {
   "Pet": "Cat",
   "Age": 2,
   "Color": "Black",
   "Owner": "Michael"
 },
 {
   "Pet": "Duck",
   "Age": 1,
   "Color": "White",
   "Owner": "Sarah"
 }
]

Picture

As an advanced option you may choose a second column to join by.

💡

Looking for the response to this example? Scroll up to see the Output tab.

Known Limitations

⚠️
If you experienced other limitations please get in touch with us!