title: get key of max value in dictionary nodejs
body: <p>I want to get the key of the max value in a dictionary using nodejs. 
  This is what I have done but it returns the max value not the key. </p>
  
  <pre><code>var b = { '1': 0.02, '2': 0.87, '3': 0.54, '4': 0.09, '5': 0.74 };
  
  var arr = Object.keys( b ).map(function ( key ) { return b[key]; });
  var max = Math.max.apply( null, arr );
  console.log(max);
  </code></pre>
  
  <p>Any idea how to do it?</p>