I want to sort an array of objects by a property from each object. For example I have this array:
var arr = [{name:"test",kills:4},{name:"test2",kills:1},{name:"test3",kills:7}]
I want to change the array so it will be sorted from the object with the max kills to the object with the minimum kills, the result that im looking for is:
[{name:"test3",kills:7},{name:"test",kills:4},{name:"test2",kills:1}]