我有如下数据,我想通过城市分组在 mat-table 中使用
arr = [{
{id: 1, status: 'active', name: 'AAA', city: 'cityA'},
{id: 2, status: 'active', name: 'AAA', city: 'cityA'},
{id: 3, status: 'active', name: 'AAA', city: 'cityA'},
{id: 4, status: 'active', name: 'AAA', city: 'cityB'},
{id: 5, status: 'active', name: 'AAA', city: 'cityB'},
{id: 6, status: 'active', name: 'AAA', city: 'cityB'},
{id: 7, status: 'active', name: 'AAA', city: 'cityC'},
{id: 8, status: 'active', name: 'AAA', city: 'cityC'},
{id: 9, status: 'active', name: 'AAA', city: 'cityC'},
}]
预期产出