title: Order array by value in NodeJS
body: <p>I am learning node and now I'm trying to order an array like this:</p>
  
  <pre><code>"lng" : [{
          "ES" : 5,
          "EN" : 3,
          "IT" : 4
      }]
  </code></pre>
  
  <p>(This is a part of a query result in MongoDB), I need to order the array <strong>by the number</strong>:</p>
  
  <pre><code>"ES" : 5,
  "IT" : 4,      
  "EN" : 3
  </code></pre>
  
  <p>I used <code>sort()</code> but this function orders the array alphabetically by the first parameter, but I need order by the second, I've tried a lot of things but without result.</p>
  
  <p>Thank you for your help!</p>