摘要: var attrArr = [{name:'颜色',detail:['红','蓝','黄']},{name:'尺寸',detail:['20cm','30cm']}]var tmp = [] for (var i in attrArr) { tmp.push(attrArr[i].detail) } 阅读全文
posted @ 2021-11-03 15:03 yanghaogogogo 阅读(58) 评论(0) 推荐(0) 编辑
摘要: var arr = [ {value: "颜色", detail: ["红"]}, {value: "尺寸", detail: ["29cm", "30cm"]}] let result = arr.reduce((res, item) => { return item.detail.reduce( 阅读全文
posted @ 2021-11-03 14:27 yanghaogogogo 阅读(64) 评论(0) 推荐(0) 编辑