I have a React.js application that is being fed JSON data from the backend.
I'm unsure of how to sort the objects by a key that is a string rather than number - if it was the latter, I could've used numerous examples.
Here's a sample string. The object I want to sort for is High, Medium and Low. I want to sort with high first, then medium, and then low ones.
{"Medium":{"This is inbetween!":[{"key":"123", "type":"inbetween"}]},
"High":{"This is the highest!":[{"key":"3333", "type":"highest"}]},
"Medium":{"This is inbetween again":[{"key":"12333123", "type":"power"}]},
"Low":{"This is the lowest!":[{"key":"123465", "type":"super low"}]}}
How do I sort this JSON data into strings high, medium and low in an array?