let list_1 = []
let list=[{232:'sfsfs'},{2323:'sfsdg'}]
for (const i in list) {
list_1.push({
id: Object.keys(list[i])[0],
name: Object.values(list[i])[0]
})
}
let list_1 = []
let list=[{232:'sfsfs'},{2323:'sfsdg'}]
for (const i in list) {
list_1.push({
id: Object.keys(list[i])[0],
name: Object.values(list[i])[0]
})
}
本文标题:[{232:'sfsfs'},{2323:'sfsdg'}]变成
本文链接:https://www.haomeiwen.com/subject/wtzxyktx.html
网友评论