Javascript. Sort array by firstname (alphabetically)
<p>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?</p>

<pre><code>user = {
   bio = "&lt;null&gt;";
   email = "user@domain.com";
   firstname = "Anna";
   id = 318;
   "last_avatar" = "&lt;null&gt;";
   "last_message" = "&lt;null&gt;";
   lastname = "Nickson";
   nickname = "anny";
};
</code></pre>
