title: js 对象根据 id 删除一条数据
date: 2020-03-18 11:52:38
tags: js
function deleteRow (id) {
for(let i in obj) {
if(obj[i].id == id) {
obj.splice(i,1)
}
}
}
title: js 对象根据 id 删除一条数据
date: 2020-03-18 11:52:38
tags: js
function deleteRow (id) {
for(let i in obj) {
if(obj[i].id == id) {
obj.splice(i,1)
}
}
}