This question already has an answer here:
I have a JSON array and I am trying to sort it by value. The problem I am having is that I am not able to keep the JSON structure with my sorting.
Here is the JSON array:
{
caffeineoverdose: '2517',
workhardplayhard: '761277',
familia: '4633452'
}
I would like something like this:
{
familia: '4633452',
workhardplayhard: '761277',
caffeineoverdose: '2517
}
[{familia: '4633452'}, {...}]
. then you can sort it. – Rocket Hazmat Jan 7 at 16:57