This is an array with objects inside of it, how can I sort it so the lowest score is the first one showing in the array?
var theArray = [{username: "A", scores: 12},
{username: "B", scores: 4},
{username: "C", scores: 2}]
So that username: "C" would become the first one in the array.
Thanks a lot in advance.