According to id specified in an array delete items

In doing deleted when we delete the background data, you do not want to query the data update, then you can delete the array in the front

According to how to delete the object id present in the array of objects in the 

List: [ 
    { 
        id: 0 
        name: 'Xiaomin' 
    }, 
    { 
        id: . 1 
        name: 'Xiaohong' 
    }, 
]
list = list.filter (item => item.id! == you want to delete the ID)

Reference: https://segmentfault.com/q/1010000019729771

Guess you like

Origin www.cnblogs.com/gfbzs/p/12517838.html