I have two arrays
[
{
"CustomerName": "Customer A",
"CustomerId": "1",
"CustomerPersonId": "1",
"CustomerPersonName": ""
},
{
"CustomerName": "Customer B",
"CustomerId": "2",
"CustomerPersonId": "1",
"CustomerPersonName": ""
},
{
"CustomerName": "Customer C",
"CustomerId": "3",
"CustomerPersonId": "2",
"CustomerPersonName": ""
}
]
And
[
{
"PersonName": "PersonName 1",
"PersonId": "1"
},
{
"PersonName": "PersonName 2",
"PersonId": "2"
}
]
I want to create an array in power automate that looks like this
[
{
"CustomerName": "Customer A",
"CustomerId": "1",
"CustomerPersonId": "1",
"CustomerPersonName": "PersonName 1"
},
{
"CustomerName": "Customer B",
"CustomerId": "2",
"CustomerPersonId": "1",
"CustomerPersonName": "PersonName 1"
},
{
"CustomerName": "Customer C",
"CustomerId": "3",
"CustomerPersonId": "2",
"CustomerPersonName": "PersonName 2"
}
]
So the thing that i want is to do a lookup on customerpersonId and get the name of that person and add that to the first array.
I would prefer not to be forced to use variables since i have many rows to update and want to make it quick. I tend to belive that using vriables does not allow a for each loop in power autoamte to be that fast.