title: Create new object from value of another object in js
body: <p>What I want to do is really simple and there is a syntax error that I can't understand:</p>
  
  <p>I have an array that contains some objects, and I want to create another array using some value of those objects:</p>
  
  <pre><code>let fields = [{type:'a',label:'email'},{type:'b',label:'name'},{type:'a',label:'tel'}]
  let respone = []
  
  // different implementation
  fields.map(item =&gt; {
     respone.push({item.label: ''}) } )
  `Uncaught SyntaxError: Unexpected token .`
  
  
  fields.map(item =&gt; {
     respone = [...response, {item.label: ''}]  } )
  `Uncaught SyntaxError: Unexpected token .`
  
  
  
  fields.map(item =&gt; {
     respone = [...response, {item['label']: ''}]  } )
  `Uncaught SyntaxError: Unexpected token [`
  </code></pre>
  
  <p>and obviously the error is from creating the object <code>{item['label']: ''}</code>.
  What is the reason for those errors, and what is the best way to create new objects from the existing object values.</p>