title: node.js - Sort JSON objects by a value
body: <p>I have this JSON file on my server:</p>
  
  <pre><code>{"1504929411112":{"name":"user1","score":"10"},"1504929416574":{"name":"2nduser","score":"14"},"1504929754610":{"name":"usr3","score":"99"},"1504929762722":{"name":"userfour","score":"40"},"1504929772310":{"name":"user5","score":"7"}}
  </code></pre>
  
  <p>Assuming I have parsed this file:</p>
  
  <pre><code>var json = JSON.parse(getJSONFile());
  </code></pre>
  
  <p>How can I now sort each object in the <code>json</code> variable by the <code>score</code> property?
  None of the array sorting functions work for me as <code>json</code> is not an array.</p>