JSON Formatting

Hello Experts,
Input :-
{
“column”: [
{
“name”: “firstName”
},
{
“name”: “lastName”
},
{
“name”: “middleName”
}
],
“content”: [
[
“aa”,
“bb”,
“cc”
],
[
“dd”,
“ee”,
“ff”
],
[
“oo”,
“pp”,
“qq”
]
]
}

Output :-
{
“data”: [
{
“firstName”: “aa”,
“lastName”: “bb”,
“middlename”: “cc”
},
{
“firstName”: “dd”,
“lastName”: “ee”,
“middlename”: “ff”
},
{
“firstName”: “oo”,
“lastName”: “pp”,
“middlename”: “qq”
}
]
}
can someone help me to achieve this without using scrip snap.

Hi @Ajay_Chawda

Using a json Generator with your input document and a downstream mapper with this expression:
$content.map(row => row.toObject((elem, index) => $column[index].name))
Mapped to a target path: $data

produces your desired output.

@cjhoward18 thank you for help it worked like magic.