title: map on javascript object - get the object keys
body: <p>i need to map an object like this</p>
  
  <pre class="lang-js prettyprint-override"><code>let obj = { 
      a : { value : 5, meta: "sss" },
      b : { value : 1, meta: "rrr" },
      a : { value : 6, meta: "nnn" },
  }`
  </code></pre>
  
  <p>to obtain and object like this</p>
  
  <pre class="lang-js prettyprint-override"><code>{ a: 5, b: 1, c:6}
  </code></pre>
  
  <p>I can't get the "key" as a string.</p>
  
  <p>I've tried:</p>
  
  <pre class="lang-js prettyprint-override"><code>let yyy = Object.keys(obj).map(function (key) {
      return { key: obj[key].value };
  });
  </code></pre>
  
  <p>But it produces an "Array" (while I need an Object) of <code>{key : 5}...</code>    with the string "key" instead of the name of the key.</p>