I have array of objects as sample below.
After JSONata evaluation, the order of array of object changes. string with numeric id appears before i.e id 5 appears before id 4a.
How to avoid this change in order
var data = [
{
"id": 1,
"body": "First Item",
"severity": 1,
"status": 0
},
{
"id": 2,
"body": "Second Item",
"severity": 2,
"status": 1
},
{
"id": 3,
"body": "third Item",
"severity": 4,
"status": 2
},
{
"id": 4a,
"body": "four Item",
"severity": 2,
"status": 1
},
{
"id": 5,
"body": "five Item",
"severity": 2,
"status": 3
}
]
var result = JSONata(query).evaluate(data)