title: how to convert nested array of objects to object of array
body: <p>I have got  array of nested array of objects .</p>
  
  <pre><code>  const data = [ {group: [{label:"1"}]}, {topGroup: [{label:"2"}]} ]
  </code></pre>
  
  <p>I want to convert array to this format of objects and I want to get this output</p>
  
  <pre><code> let permission ={
  
         group:["1"],
         topGroup:["2"]
       }
  </code></pre>
  
  <p>How can I do this ?</p>