I’m trying to group by below JSON Message:
[
{
"Id": "1",
"name": "xxx",
"age": "20"
},
{
"Id": "1",
"name": "yyy",
"age": "52"
},
{
"Id": "5",
"name": "zzz",
"age": "59"
}
]
to
[
{
"1": [
{
"Id": "1",
"name": "xxx",
"age": "20"
},
{
"Id": "1",
"name": "yyy",
"age": "52"
}
],
"5": [
{
"Id": "5",
"name": "zzz",
"age": "59"
}
]
}
]
Can someone please help?
JSON Array to another JSON array with group by on fly.
NOTE: I don’t want to use the Azure function for this.
Thanks,
Deepak
2
Answers
I have reproduced in my environment and got expected results as below:
Design:
JavaScript:
Output:
To execute inline script you need have integration account integrated with logic app.
This is an example of how to do it using nothing but standard actions in LogicApps …
Create a new LogicApp and load the definition into it via the Code View.