You can do using these steps -
Initialize a array variable name firstArray using first array values. Example -
[
{"Answer":1,"Answered":true,"CQID":"C10Q62","CompID":10,"QID":"62","Weight":3},
{"Answer":0,"Answered":true,"CQID":"C10Q63","CompID":10,"QID":"63","Weight":2},
{"Answer":1,"Answered":true,"CQID":"C10Q64","CompID":10,"QID":"64","Weight":2}
]
Then also initilize secondArray with 2nd array values -
[
{"QID":"62","Ddescription":"Some description for item question 62"},
{"QID":"63","Ddescription":"Some description for another item"},
{"QID":"64","Ddescription":"Description for item question 64"}
]
then add select action in from use secondArray variable and map values
Key: item()?['QID']
Value: item()?['Ddescription']
You will get output like -
{
"62": "Some description for item question 62",
"63": "Some description for another item",
"64": "Description for item question 64"
}
then again use select action to merge both arrays.
From: Select firstArray variable.
Map: Use the following mappings:
Answer: item()?['Answer']
Answered: item()?['Answered']
CQID: item()?['CQID']
CompID: item()?['CompID']
QID: item()?['QID']
Weight: item()?['Weight']
Ddescription: body('Select')?[item()?['QID']]
you will get output like
[
{
"Answer": 1,
"Answered": true,
"CQID": "C10Q62",
"CompID": 10,
"QID": "62",
"Weight": 3,
"Ddescription": "Some description for item question 62"
},
{
"Answer": 0,
"Answered": true,
"CQID": "C10Q63",
"CompID": 10,
"QID": "63",
"Weight": 2,
"Ddescription": "Some description for another item"
},
{
"Answer": 1,
"Answered": true,
"CQID": "C10Q64",
"CompID": 10,
"QID": "64",
"Weight": 2,
"Ddescription": "Description for item question 64"
}
]
"Select" action to map over the firstArray and add the Ddescription from the dictionary created from secondArray