📅  最后修改于: 2022-03-11 15:01:50.201000             🧑  作者: Mango
const apps = [
{id:1, name:'test1'},
{id:2, name:'test2'},
{id:3, name:'test3'}
]
//remove item with id=2
const itemToBeRemoved = {id:2, name:'test2'}
apps.splice(apps.findIndex(a => a.id === itemToBeRemoved.id) , 1)
//print result
console.log(apps)