title: Using spread operator on array of object to access elements
body: <p>How to use the spread operator to access element in my array of object ?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const array = [{ obj: 1},{ obj: 2}]
  
  console.log([...array].obj)
  // Output undefined 
  
  console.log([...array.obj])
  // Output Uncaught TypeError</code></pre>
  </div>
  </div>
  </p>
  <p>I've seen this post <a href="https://stackoverflow.com/questions/40406663/use-spread-operator-on-objects-array">Use spread operator on objects array?</a> which is quite similar but they do not try to access elements.</p>
  <p>So is it possible to use spread operator on array of object to access elements ? If so how ?</p>