数组对象处理
const flatObject = Object.keys({ ...list }).reduce((result: any, key) => { const innerObj = { ...list }[key]; Object.keys(innerObj).forEach((innerKey) => { result[innerKey] = innerObj[innerKey]; }); return result; }, {});
本文来自博客园,作者:zjxgdq,转载请注明原文链接:https://www.cnblogs.com/zjxzhj/p/17678857.html