reduce功能很强大,可以学习下 result.reduce((arr, item) => arr.concat(item.secondName.map((sitem, sindex) => ({name: item.name, secondName: sitem, index: arr.length + sindex}))), [])
阅读量:1
点赞量:0