How to reorganize array

there is an array like this

[
  {
     id:1,
     info: {name:"abc"}
     show: true
  },
 {
     id:2,
     info: {name:"abc"}
     show: true
  },
 {
     id:3,
     info: {name:"qq"}
     show: true
  }
 ]

then I want to reorganize array to put the same info.name in the same object like this. Is there a way to do that?

[
    
      {
        {
          id:1,
          info: {name:"abc"}
          show: true
       },
        {
          id:2,
          info: {name:"abc"}
          show: true
       },
      },
      
    
     {
         id:3,
         info: {name:"qq"}
         show: true
      }
     ]

Mar.19,2022

there is something wrong with the reorganized data


the structure in Object is the structure of key-value pairs.
if you want to classify, you can try the following formats

< H2 > first format < / H2 >
// ,
var newArr=Object.keys(obj).map(key=>obj[key].data)
is actually a simple application of native functions. It is recommended that you learn the basics well so that you can convert the data into the format you want according to your needs.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea404d-4f171.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea404d-4f171.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?