字符串如图所示是按照地市区分,把地市的数组合起来了,怎么把地市编号后面的数组合并成一个数组

后端接口给的字符串怎么把字符串里面的数组抽出来合并成一个数组?
字符串如图所示

img


是按照地市区分,把地市的数组合起来了,怎么把地市编号后面的数组合并成一个数组?

data: {
        '320100': [
          { 'city': '南京市', 'cityFid': '320100', 'create': null, 'fid': 'STS20220722111009371A43EE', 'list': [{ 'fid': null, 'situation': '13', 'stcFid': null, 'workEndTime': '2022-09-02', 'workPort': '4613', 'workStartTime': '2022-09-01', 'workType': '131' }, { 'fid': null, 'situation': '14', 'stcFid': null, 'workEndTime': '2022-09-03', 'workPort': '4614', 'workStartTime': '2022-09-02', 'workType': '132' }, { 'fid': null, 'situation': '15', 'stcFid': null, 'workEndTime': '2022-09-04', 'workPort': '4615', 'workStartTime': '2022-09-03', 'workType': '133' }, { 'fid': null, 'situation': '16', 'stcFid': null, 'workEndTime': '2022-09-05', 'workPort': '4616', 'workStartTime': '2022-09-04', 'workType': '134' }, { 'fid': null, 'situation': '17', 'stcFid': null, 'workEndTime': '2022-09-06', 'workPort': '4617', 'workStartTime': '2022-09-05', 'workType': '135' }, { 'fid': null, 'situation': '18', 'stcFid': null, 'workEndTime': '2022-09-07', 'workPort': '4618', 'workStartTime': '2022-09-06', 'workType': '136' }, { 'fid': null, 'situation': '19', 'stcFid': null, 'workEndTime': '2022-09-08', 'workPort': '4619', 'workStartTime': '2022-09-07', 'workType': '137' }], 'listDetailed': null, 'replacementFrequency': 5, 'shipCompanyFid': null, 'shipCompanyName': '南京有限责任公司', 'shipFid': 'WWFTSI20220616111447C25BE39F', 'shipName': 'ss002', 'shipTotal': 22.0, 'smFid': 'TASK20220610110136C4A99C0D', 'taskNumber': 7, 'washFrequency': 5 },
          { 'city': '南京市', 'cityFid': '320100', 'create': null, 'fid': 'STS20220722111009209699E2', 'list': [{ 'fid': null, 'situation': '13', 'stcFid': null, 'workEndTime': '2022-09-02', 'workPort': '4613', 'workStartTime': '2022-09-01', 'workType': '131' }, { 'fid': null, 'situation': '14', 'stcFid': null, 'workEndTime': '2022-09-03', 'workPort': '4614', 'workStartTime': '2022-09-02', 'workType': '132' }, { 'fid': null, 'situation': '15', 'stcFid': null, 'workEndTime': '2022-09-04', 'workPort': '4615', 'workStartTime': '2022-09-03', 'workType': '133' }, { 'fid': null, 'situation': '16', 'stcFid': null, 'workEndTime': '2022-09-05', 'workPort': '4616', 'workStartTime': '2022-09-04', 'workType': '134' }, { 'fid': null, 'situation': '17', 'stcFid': null, 'workEndTime': '2022-09-06', 'workPort': '4617', 'workStartTime': '2022-09-05', 'workType': '135' }, { 'fid': null, 'situation': '18', 'stcFid': null, 'workEndTime': '2022-09-07', 'workPort': '4618', 'workStartTime': '2022-09-06', 'workType': '136' }, { 'fid': null, 'situation': '19', 'stcFid': null, 'workEndTime': '2022-09-08', 'workPort': '4619', 'workStartTime': '2022-09-07', 'workType': '137' }], 'listDetailed': null, 'replacementFrequency': 6, 'shipCompanyFid': null, 'shipCompanyName': '南京有限责任公司', 'shipFid': 'WWFTSI20220616111447C25BE39F', 'shipName': 'ss002', 'shipTotal': 22.0, 'smFid': 'TASK20220610110136C4A99C0D', 'taskNumber': 7, 'washFrequency': 3 },
          { 'city': '南京市', 'cityFid': '320100', 'create': null, 'fid': 'STS20220722111010E9B59858', 'list': [{ 'fid': null, 'situation': '13', 'stcFid': null, 'workEndTime': '2022-09-02', 'workPort': '4613', 'workStartTime': '2022-09-01', 'workType': '131' }, { 'fid': null, 'situation': '14', 'stcFid': null, 'workEndTime': '2022-09-03', 'workPort': '4614', 'workStartTime': '2022-09-02', 'workType': '132' }, { 'fid': null, 'situation': '15', 'stcFid': null, 'workEndTime': '2022-09-04', 'workPort': '4615', 'workStartTime': '2022-09-03', 'workType': '133' }, { 'fid': null, 'situation': '16', 'stcFid': null, 'workEndTime': '2022-09-05', 'workPort': '4616', 'workStartTime': '2022-09-04', 'workType': '134' }, { 'fid': null, 'situation': '17', 'stcFid': null, 'workEndTime': '2022-09-06', 'workPort': '4617', 'workStartTime': '2022-09-05', 'workType': '135' }, { 'fid': null, 'situation': '18', 'stcFid': null, 'workEndTime': '2022-09-07', 'workPort': '4618', 'workStartTime': '2022-09-06', 'workType': '136' }, { 'fid': null, 'situation': '19', 'stcFid': null, 'workEndTime': '2022-09-08', 'workPort': '4619', 'workStartTime': '2022-09-07', 'workType': '137' }], 'listDetailed': null, 'replacementFrequency': 8, 'shipCompanyFid': null, 'shipCompanyName': '南京有限责任公司', 'shipFid': 'WWFTSI20220616111447C25BE39F', 'shipName': 'ss002', 'shipTotal': 22.0, 'smFid': 'TASK20220610110136C4A99C0D', 'taskNumber': 7, 'washFrequency': 3 }],
        '320200': [
          { 'city': '无锡市', 'cityFid': '320200', 'create': null, 'fid': 'STS20220727173715EA5D6FBF', 'list': [{ 'fid': null, 'situation': 'fsdfa 缺乏发送阿法第三方阿发斯蒂芬阿发斯蒂芬改阿发发多少', 'stcFid': null, 'workEndTime': '2022-09-02', 'workPort': '123', 'workStartTime': '2022-09-01', 'workType': '234' }, { 'fid': null, 'situation': '123432', 'stcFid': null, 'workEndTime': '2022-09-02', 'workPort': '@@@', 'workStartTime': '2022-09-01', 'workType': '二玩儿' }, { 'fid': null, 'situation': 'fsdfa 缺乏发送阿法第三方阿发斯蒂芬阿发斯蒂芬改阿发发多少', 'stcFid': null, 'workEndTime': '2022-09-03', 'workPort': '123', 'workStartTime': '2022-09-01', 'workType': '234' }, { 'fid': null, 'situation': '123432', 'stcFid': null, 'workEndTime': '2022-09-03', 'workPort': '@@@', 'workStartTime': '2022-09-01', 'workType': '二玩儿' }], 'listDetailed': null, 'replacementFrequency': 5, 'shipCompanyFid': null, 'shipCompanyName': '测试水路运输企业01', 'shipFid': 'WWFTSI20220609110610648DC8A8', 'shipName': '苏苏洁00111', 'shipTotal': 1000.0, 'smFid': 'TASK202207211835293B76FFE9', 'taskNumber': 10, 'washFrequency': 2 }
        ]
      },

不知道我理解的对不对


const data = {
    '320100': [
        {
            'city': '南京市', 'cityFid': '320100', 'create': null, 'fid': 'STS20220722111009371A43EE', 
            'list': [
                { 'fid': null, 'situation': '13', 'stcFid': null, 'workEndTime': '2022-09-02', 'workPort': '4613', 'workStartTime': '2022-09-01', 'workType': '131' }, 
                { 'fid': null, 'situation': '14', 'stcFid': null, 'workEndTime': '2022-09-03', 'workPort': '4614', 'workStartTime': '2022-09-02', 'workType': '132' }, 
                { 'fid': null, 'situation': '15', 'stcFid': null, 'workEndTime': '2022-09-04', 'workPort': '4615', 'workStartTime': '2022-09-03', 'workType': '133' }, 
                { 'fid': null, 'situation': '16', 'stcFid': null, 'workEndTime': '2022-09-05', 'workPort': '4616', 'workStartTime': '2022-09-04', 'workType': '134' }, 
                {'fid': null, 'situation': '17', 'stcFid': null, 'workEndTime': '2022-09-06', 'workPort': '4617', 'workStartTime': '2022-09-05', 'workType': '135'},
             { 'fid': null, 'situation': '18', 'stcFid': null, 'workEndTime': '2022-09-07', 'workPort': '4618', 'workStartTime': '2022-09-06', 'workType': '136' }, 
             { 'fid': null, 'situation': '19', 'stcFid': null, 'workEndTime': '2022-09-08', 'workPort': '4619', 'workStartTime': '2022-09-07', 'workType': '137' }
            ], 
            'listDetailed': null, 'replacementFrequency': 5, 'shipCompanyFid': null, 'shipCompanyName': '南京有限责任公司', 'shipFid': 'WWFTSI20220616111447C25BE39F', 'shipName': 'ss002', 'shipTotal': 22.0, 'smFid': 'TASK20220610110136C4A99C0D', 'taskNumber': 7, 'washFrequency': 5
        },
        {
            'city': '南京市', 'cityFid': '320100', 'create': null, 'fid': 'STS20220722111009209699E2', 'list': [{ 'fid': null, 'situation': '13', 'stcFid': null, 'workEndTime': '2022-09-02', 'workPort': '4613', 'workStartTime': '2022-09-01', 'workType': '131' }, { 'fid': null, 'situation': '14', 'stcFid': null, 'workEndTime': '2022-09-03', 'workPort': '4614', 'workStartTime': '2022-09-02', 'workType': '132' }, { 'fid': null, 'situation': '15', 'stcFid': null, 'workEndTime': '2022-09-04', 'workPort': '4615', 'workStartTime': '2022-09-03', 'workType': '133' }, { 'fid': null, 'situation': '16', 'stcFid': null, 'workEndTime': '2022-09-05', 'workPort': '4616', 'workStartTime': '2022-09-04', 'workType': '134' }, {
                'fid': null, 'situation': '17', 'stcFid': null, 'workEndTime': '2022-09-06', 'workPort': '4617', 'workStartTime': '2022-09-05', 'workType': '135'
            }, { 'fid': null, 'situation': '18', 'stcFid': null, 'workEndTime': '2022-09-07', 'workPort': '4618', 'workStartTime': '2022-09-06', 'workType': '136' }, { 'fid': null, 'situation': '19', 'stcFid': null, 'workEndTime': '2022-09-08', 'workPort': '4619', 'workStartTime': '2022-09-07', 'workType': '137' }], 'listDetailed': null, 'replacementFrequency': 6, 'shipCompanyFid': null, 'shipCompanyName': '南京有限责任公司', 'shipFid': 'WWFTSI20220616111447C25BE39F', 'shipName': 'ss002', 'shipTotal': 22.0, 'smFid': 'TASK20220610110136C4A99C0D', 'taskNumber': 7, 'washFrequency': 3
        },
        { 'city': '南京市', 'cityFid': '320100', 'create': null, 'fid': 'STS20220722111010E9B59858', 'list': [{ 'fid': null, 'situation': '13', 'stcFid': null, 'workEndTime': '2022-09-02', 'workPort': '4613', 'workStartTime': '2022-09-01', 'workType': '131' }, { 'fid': null, 'situation': '14', 'stcFid': null, 'workEndTime': '2022-09-03', 'workPort': '4614', 'workStartTime': '2022-09-02', 'workType': '132' }, { 'fid': null, 'situation': '15', 'stcFid': null, 'workEndTime': '2022-09-04', 'workPort': '4615', 'workStartTime': '2022-09-03', 'workType': '133' }, { 'fid': null, 'situation': '16', 'stcFid': null, 'workEndTime': '2022-09-05', 'workPort': '4616', 'workStartTime': '2022-09-04', 'workType': '134' }, { 'fid': null, 'situation': '17', 'stcFid': null, 'workEndTime': '2022-09-06', 'workPort': '4617', 'workStartTime': '2022-09-05', 'workType': '135' }, { 'fid': null, 'situation': '18', 'stcFid': null, 'workEndTime': '2022-09-07', 'workPort': '4618', 'workStartTime': '2022-09-06', 'workType': '136' }, { 'fid': null, 'situation': '19', 'stcFid': null, 'workEndTime': '2022-09-08', 'workPort': '4619', 'workStartTime': '2022-09-07', 'workType': '137' }], 'listDetailed': null, 'replacementFrequency': 8, 'shipCompanyFid': null, 'shipCompanyName': '南京有限责任公司', 'shipFid': 'WWFTSI20220616111447C25BE39F', 'shipName': 'ss002', 'shipTotal': 22.0, 'smFid': 'TASK20220610110136C4A99C0D', 'taskNumber': 7, 'washFrequency': 3 }],
    '320200': [
        {
            'city': '无锡市', 'cityFid': '320200', 'create': null, 'fid': 'STS20220727173715EA5D6FBF', 'list': [{ 'fid': null, 'situation': 'fsdfa 缺乏发送阿法第三方阿发斯蒂芬阿发斯蒂芬改阿发发多少', 'stcFid': null, 'workEndTime': '2022-09-02', 'workPort': '123', 'workStartTime': '2022-09-01', 'workType': '234' }, { 'fid': null, 'situation': '123432', 'stcFid': null, 'workEndTime': '2022-09-02', 'workPort': '@@@', 'workStartTime': '2022-09-01', 'workType': '二玩儿' }, {
                'fid': null, 'situation': 'fsdfa 缺乏发送阿法第三方阿发斯蒂芬阿发斯蒂芬改阿发发多少', 'stcFid': null,
                'workEndTime': '2022-09-03', 'workPort': '123', 'workStartTime': '2022-09-01', 'workType': '234'
            }, { 'fid': null, 'situation': '123432', 'stcFid': null, 'workEndTime': '2022-09-03', 'workPort': '@@@', 'workStartTime': '2022-09-01', 'workType': '二玩儿' }], 'listDetailed': null, 'replacementFrequency': 5, 'shipCompanyFid': null, 'shipCompanyName': '测试水路运输企业01', 'shipFid': 'WWFTSI20220609110610648DC8A8', 'shipName': '苏苏洁00111', 'shipTotal': 1000.0, 'smFid': 'TASK202207211835293B76FFE9', 'taskNumber': 10, 'washFrequency': 2
        }
    ]
}

const resArr = []
for (let key in data){
    data[key].forEach(element => {
        resArr.push(element)
    });
}
console.log(resArr);

var arr = [];
Object.keys(data).forEach(key => {
    arr.push(...data[key])
});
console.log(arr);