📜  javascript 使用列表加入对象列表 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:14.762000             🧑  作者: Mango

代码示例1
// map results in any[][] which is destructured and concatenated
// object: {someBoolean: boolean, objectWithLists: {id: string, list:any[]}[]}
[].concat(...object.listOfObjectsWithListAndId.map(
                            (obj: {id: string, list: any[]}) => obj.list,
                          ),
                        )