javascript – Restructuring JSON to create a new JSON where properties are grouped according to similar values

I have a JSON structure in the following example format:

(
  {date: '01-01-2021', name: 'House 1', value: '500'},
  {date: '01-01-2021', name: 'House 2', value: '600'},
  {date: '01-01-2021', name: 'House 3', value: '700'},
  {date: '01-01-2021', name: 'House 4', value: '800'},
  {date: '01-02-2021', name: 'House 1', value: '200'},
  {date: '01-02-2021', name: 'House 2', value: '100'},
  {date: '01-02-2021', name: 'House 3', value: '300'},
  {date: '01-02-2021', name: 'House 4', value: '1000'},
)

I have written logic to group it in the following format:

(
  {date: '01-01-2021', 'House 1': 500, 'House 2': 600, 'House 3': 700, 'House 4': 800},
  {date: '01-02-2021', 'House 1': 200, 'House 2': 100, 'House 3': 300, 'House 4': 1000},
)

Below is code I have written. It works and seems to be efficient, but I am curious if this was the best approach or if there is a simpler way to accomplish this task? The actual data set contains a total of 2274 objects that is reduced to an array of 748 objects.

Code:

const housing_table_data = ((json_data) => {
        const unique_dates = housing_data.reduce((accumulator, current_value) => {
            if (accumulator.indexOf(current_value.dt) === -1) {
                accumulator.push(current_value.dt);
            }
            return accumulator;
        }, ());

        let table_data = ();

        unique_dates.forEach((date, index) => {
            table_data.push({dt: date});

            let house_groupings = housing_data.filter(data => data.dt === date);

            house_groupings.forEach(group => {
                table_data(index)(group.name) = group.val;
            });
        });

        return table_data;
    })(housing_data);