title: Ordering lists in Javascript
body: <p>I have a list whose members are nested lists of integers, for example :</p>
  
  <pre><code>[ [1,2], [], [1,2,3], [ [1,2],3], [1,2,4], [ [], [1,2] ], [34,5,6], [-1,66] ]
  </code></pre>
  
  <p>I want to sort this list, using (what every other language in the world) would consider standard ordering of nested lists. For example :</p>
  
  <pre><code>[] &lt; [ [1] ] &lt; [ [1,2] ] &lt; [ [2] ] &lt; [ [11] ]
  </code></pre>
  
  <p><code>l.sort()</code> messes this up, because it turns the lists into strings</p>
  
  <p>Is there an easy way, either in javascript (or a common library like lodash) to get a proper sort of nested lists?</p>