"productItemInfo":[{"字面颜色":"蓝色系/深蓝色"},{"字边颜色":"金属色/拉丝银"},{"光源颜色":"正白灯(6000k-7000k)"},{"是否淋雨":"是"},{"固定方式":"外脚码安装"}],let productItemArr=[]this.productItemInfo.forEach(n=>{productItemArr.push({name:Object.keys(n)[0],namekey:n[Object.keys(n)[0]]})})console.log(productItemArr)
打印的效果