I have an array with a single object populated like so:
valueArr = [{
485: 201.5897,
487: 698.52,
598: 351.85,
...
year: '2016'
}];
Now, i want to rearange / sort the object from largest - smallest value. The Ouptput i'm looking for would be something like this:
valueArr = [{
487: 698.52,
598: 351.85,
485: 201.5897,
...
year: '2016'
}];
NOTE: The "year"-property should be excluded in the sorting. There is only one property of this inside the object.
Is it possible to rearange/sort an object like this?