@Anonymous Thanks for reaching out. Sort method would have helped in scenario when your property is not the nested JSON object.
For example, if your json would be below and you want to sort it with the property ex then you would have used the
sort(body('Parse_JSON'),'exp') but this doesn't work with the nested json object properties.
[
{
"ex": "2023-09-20",
"attributes": {
"enabled": true,
"exp": "2023-09-20"
},
"id": "1",
"tags": {
"owner": "test"
}
},
{
"ex": "2023-09-19",
"attributes": {
"enabled": true,
"exp": "2023-09-19"
},
"id": "2",
"tags": {
"owner": "test"
}
},
{
"ex": "2023-09-18",
"attributes": {
"enabled": true,
"exp": "2023-09-18"
},
"id": "3",
"tags": {
"owner": "test"
}
}
]
The workaround would be leveraging the liquid template or use the inline code to sort it as per your need.
Let me know if you have any queries or concerns.