How would you sort an associative array by the values properties? The value itself is an object with multiple properties and one of the properties of the object is a string. I want to be able to rearrange the array alphabetically by the string. Is that possible?
I tried looking for answers in several places including here: How to sort an array of associative arrays by value of a given key in PHP?
How to sort an associative array by its values in Javascript?
How to sort an (associative) array by value?
I don't think those answered my question... not least not in a way I understand. Any help would be appreciated. Example:
Object = {
1: obj.prop = "C",
5: obj.prop = "A,
3: obj.prop = "B
}
I would want:
Object = {
5: obj.prop = "A",
3: obj.prop = "B",
1: obj.prop = "C"
}