I have an object, that looks like this:
[ { lat: 46.3464475, lon: 13.7108946, temp: 4.9 },
{ lat: 46.3435078, lon: 13.5745311, temp: 4.9 },
{ lat: 46.2430966, lon: 13.5811079, temp: 5.26 },
{ lat: 46.3437653, lon: 13.5744452, temp: 4.9 },
{ lat: 46.1830688, lon: 13.712461, temp: 7.01 },
{ lat: 45.5425894, lon: 13.7225676, temp: 10.08 },
{ lat: 45.5499172, lon: 13.73, temp: 10.08 },
{ lat: 45.5447137, lon: 13.725915, temp: 10.08 },
{ lat: 45.545615, lon: 13.7271917, temp: 10.08 },
{ lat: 45.5491447, lon: 13.7250566, temp: 10.08 } ]
So I would now like to sort it by the temp parameter. I did try to save the temp inside another array, sort that one and match it to the locations, but that gives me a lot of duplicates. How would I do this?