I got an array (see below for one object in the array) that I need to sort by firstname using JavaScript. How can I do it?
var user = { bio: null, emai
in simply words you can use this method
users.sort(function(a,b){return a.firstname < b.firstname ? -1 : 1});