I have an array of object literals like this:
var myArr = []; myArr[0] = { \'score\': 4, \'name\': \'foo\' } myArr[1] = { \'score\': 1, \'name\
You could have a look at the Array.sort documentation on MDN. Specifically at the documentation about providing a custom compareFunction