I have an input like:
[
{
"Attachments": [
{
"FileType": "pdf"
},
{
"FileType": "txt"
}
],
"Name": "test"
},
{
"Attachments": [],
"Name": "test2"
}
]
]
and the output I want is:
[
{
"FileType": "pdf",
"Name": "test"
},
{
"FileType": "txt",
"Name": "test"
},
{
"FileType": null,
"Name": "test2"
}
]
So, the question is how can I get an array with an element for each combination of attachment and name using DataWeave 2.0?