I have an array with a single index that has a JSON object that contains three different string arrays, which I have to map into a single one based on each index. for example all first index from each array into one single JSON object and so on...
Is it possible in Dataweave Transformation?
Input
[{
"id": [
"123",
"456",
"789"
],
"name": [
"Test Brand 1",
"Test Brand 2",
"Test Brand 3"
],
"address": [
"Via Roma 1",
"Via Milano 1",
"Via Napoli 1"
]
}]
Desired output:
[
{
"Key1": "123",
"Key2": "Test Brand 1",
"Key3": "Via Roma 1"
},
{
"Key1": "456",
"Key2": "Test Brand 2",
"Key3": "Via Milano 1"
},
{
"Key1": "789",
"Key2": "Test Brand 3",
"Key3": "Via Napoli 1"
}
]