Hi Marco Cavalazzi ,
Thankyou for using Microsoft Q&A platforrm and thanks for posting your question here.
As I understand your query, you want to convert the multiple jsons into single array of json output using mapping data flow after transforming tabular data into json data. Please let me know if that is not the ask here.
Although the expected output is an array of json, it would require a column to hold that value , so you might achieve the following output via the below solution, on top of which you can use set variable activity after dataflow activity to substring the unwanted part i.e. {"finaloutput":
and }
{
"finaloutput": [
{
"referenceNumber": "63",
"firstName": "Jane",
"lastName": "Doe",
"gender": "Female",
"items": [
{
"itemNumber": "1"
},
{
"itemNumber": "2"
},
{
"itemNumber": "3"
}
]
},
{
"referenceNumber": "62",
"firstName": "John",
"lastName": "Doe",
"gender": "male",
"items": [
{
"itemNumber": "1"
},
{
"itemNumber": "2"
},
{
"itemNumber": "3"
}
]
}
]
}
Add another aggregate transformation to create a new column named 'finaloutput' and use the below expression:
collect(@(referenceNumber=referenceNumber,firstName=firstName,lastName=lastName,gender=gender,items=items))
Here is how the output looks like:
Kindly check the following thread for more details:
Hope it helps. Kindly accept the answer by clicking on Accept answer
button. Thankyou