摘要:
var attrArr = [{name:'颜色',detail:['红','蓝','黄']},{name:'尺寸',detail:['20cm','30cm']}]var tmp = [] for (var i in attrArr) { tmp.push(attrArr[i].detail) } 阅读全文
摘要:
var arr = [ {value: "颜色", detail: ["红"]}, {value: "尺寸", detail: ["29cm", "30cm"]}] let result = arr.reduce((res, item) => { return item.detail.reduce( 阅读全文