Goodmorning, I am having a problem figuring out how to sort the following JSON
{
"135": {"name": "marco", "title": "foo"},
"223": {"name": "wilco", "title": "bar"},
"322": {"name": "enola", "title": "baz"}
}
I wish to sort by name (and sometimes, possible title. However the complete line should be sorted. Should I convert this into an proper array first?
Thanks!
You can never sort an object. You need to convert this into an array.
For this particular problem if you cannot change the object into array.
You can follow this,
Demo