title: convert array of objects into object of objects properties from array
body: <p>I need to convert an array of objects into an object of objects properties from the array. </p>
  
  <p>Here is an example of an <code>array of objects</code></p>
  
  <pre><code>const array = [
   {
    book:5,
    car: 6,
    pc: 7
   },
   {
    headphone: 9,
    keyboard: 10
   },
  ];
  </code></pre>
  
  <p>I need it to be converted to</p>
  
  <pre><code>const obj = {
   book:5,
   car: 6,
   pc: 7,
   headphone: 9,
   keyboard: 10
  };
  </code></pre>
  
  <p>I tried many ways but can't achieve the final result. Thanks in advance </p>