so I have this array called "groupedItems" which basically looks like this:
[
{
"bestelltbei": "Arzt",
"Email": "test@testmail.com",
"Items": [
{
"Patient": "Testpatient1",
"Bestellung": "1 Rollstuhl"
}
]
}
]
with every new order this array should update to something like this:
[
{
"bestelltbei": "Arzt",
"Email": "test@testmail.com",
"Items": [
{
"Patient": "Testpatient1",
"Bestellung": "1 Rollstuhl"
},
{
"Patient": "Testpatient2",
"Bestellung": "1 Verband"
},
]
}
]
I can't seem to find the right operation, tried it with union etc.
union(variables('groupedItems')[variables('currentIndex')]['Items'],variables('secondarray'))
but I cannot "navigate" to the inner "Items"-array.
"secondarray" looks like this:
{
"Patient": "@{items('Apply_to_each')?['Title']}",
"Bestellung": "@{items('Apply_to_each')?['Menge']} @{items('Apply_to_each')?['Medikament']}"
}
Please help, sitting on this for days. Thanks in advance...