vm.workinfoList.forEach((item) => {
let str = "{"
for (let key in item) {
// console.log(item[ind])
// str +="'"ind+"':'"+ item[ind]+"',"
str += " '" + key + "':'" + item[key] + "',"
}
str += "}"
listDown2.push(str)
// console.log(listDown2)
})
遍历数组数据 拼接想要的对象格式
最新推荐文章于 2023-03-09 15:45:18 发布