How to reclassify JSON data by class with JS?

 [    
        {
        "id":"0001",
        "name":"aa001",
        "value":"10",
        "group":"01"
        },    
        {
        "id":"0002",
        "name":"aa002",
        "value":"11",
        "group":"01"
        },    
        {
        "id":"0003",
        "name":"aa003",
        "value":"17",
        "group":"01"
        },    
        {
        "id":"0004",
        "name":"aa004",
        "value":"19",
        "group":"02"
        },    
        {
        "id":"0005",
        "name":"aa005",
        "value":"29",
        "group":"02"
        },    
        {
        "id":"0006",
        "name":"aa006",
        "value":"27",
        "group":"02"
        },
        "id":"0007",
        "name":"aa007",
        "value":"28",
        "group":"03"
        },    
        {
        "id":"0008",
        "name":"aa008",
        "value":"85",
        "group":"03"
        },
        "id":"0009",
        "name":"aa009",
        "value":"86",
        "group":"03"
        }
    ]
 [
        {
            ["aa001":
                {
                "id":"aa001"
                "aa001":"10"
                }],
                ["aa002":
                {
                "id":"aa002"
                "aa002":"11"
                }],
                ["aa003":
                {
                "id":"aa003"
                "aa003":"17"
                }
            ],
        },
        {
            [
                "aa004":
                {
                "id":"aa004"
                "aa004":"19"
                }],
                ["aa005":
                {
                "id":"aa005"
                "aa005":"29"
                }],
                ["aa006":
                {
                "id":"aa006"
                "aa006":"27"
                }
            ],
        },
        {
            [
                "aa007":
                {
                "id":"aa007"
                "aa007":"28"
                }],
                ["aa008":
                {
                "id":"aa008"
                "aa008":"85"
                }],
                ["aa009":
                {
                "id":"aa009"
                "aa009":"86"
                }
            ],
        }
    ]

I want to output the above JSON data in groups according to GROUP to the following format. How to operate it with JS? thank you.

Mar.31,2021

just write one:

function handle(list) {
  const obj = {};
  list.forEach(item => {
    let { group, name, value } = item;
    let temp = {
      id: name,
      [name]: value,
    };
    if (obj[group]) {
      obj[group].push(temp);
    } else {
      obj[group] = [temp];
    }
  });
  return Object.values(obj).map(val => {
    return {
      [val[0].id]: val,
    };
  });
}

use lodash's groupBy:
https://lodash.com/docs/4.17.

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-1b3fc99-2ba0a.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-1b3fc99-2ba0a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?