I'm getting the data below from a Firebase Realtime Database and want to sort data entries by their value.
How can I convert the following data
{
"scores": {
"bruhathkayosaurus" : 55,
"lambeosaurus" : 21,
"linhenykus" : 80,
"pterodactyl" : 93,
"stegosaurus" : 5,
"triceratops" : 22
}
}
to this
{
"scores": {
"pterodactyl" : 93,
"linhenykus" : 80,
"bruhathkayosaurus" : 55,
"triceratops" : 22
"lambeosaurus" : 21,
"stegosaurus" : 5
}
}