I am trying to sort this json object according to "x" but can't find any solution.
{
"resources": [, {
"urlC": "https://example.com/ghi.png",
"size": 1657,
"x": 610026.970856,
"y": 2,
"x2": 610026.970874,
"status": 200
},{
"urlC": "https://example.com/abc.png",
"size": 1827,
"x": 610026.970777,
"y": 0,
"x2": 610026.970795,
"status": 200
}, {
"urlC": "https://example.com/def.png",
"size": 2026,
"x": 610026.970816,
"y": 1,
"x2": 610026.970835,
"status": 200
}, {
"urlC": "https://example.com/jkl.png",
"size": 1871,
"x": 610026.970897,
"y": 3,
"x2": 610026.970914,
"status": 200
}]
}
I want this type of data :
{
"resources": [{
"urlC": "https://example.com/abc.png",
"size": 1827,
"x": 610026.970777,
"y": 0,
"x2": 610026.970795,
"status": 200
}, {
"urlC": "https://example.com/def.png",
"size": 2026,
"x": 610026.970816,
"y": 1,
"x2": 610026.970835,
"status": 200
}, {
"urlC": "https://example.com/ghi.png",
"size": 1657,
"x": 610026.970856,
"y": 2,
"x2": 610026.970874,
"status": 200
}, {
"urlC": "https://example.com/jkl.png",
"size": 1871,
"x": 610026.970897,
"y": 3,
"x2": 610026.970914,
"status": 200
}]}