数组相关操作
1. 将数据对象重组成需要的数组
const obj = { fileId: '2022091247189020160833,2022091247189166178204', fileName: 'logo-axa.png,1.zhimg.jpg', time: '2022-09-08 13:20:00', postalCode: '12345678', policyHolderAddress: '上海市上海市浦东新区', owner: 'admin', success: '1', } const a = obj.fileId.split(',').map((val, item) => { return Object.assign({}, { fileId: val, fileName: obj.fileName.split(',')[item] }) }) console.log(a)