ReactiveArray icon indicating copy to clipboard operation
ReactiveArray copied to clipboard

How to remove array by object key?

Open thearabbit opened this issue 10 years ago • 1 comments

I have

var arr = new ReactiveArray([
  {id: '1', name: 'a'},
  {id: '2', name: 'b'}
])

I would like to remove by id = 1. please help me.

thearabbit avatar Aug 09 '15 09:08 thearabbit

arr.remove(function(item) { return item.id === 1 }) On Aug 9, 2015 3:20 AM, "Yuom Theara" [email protected] wrote:

I have

var arr = new ReactiveArray([ {id: '1', name: 'a'}, {id: '2', name: 'b'} ])

I would like to remove by id = 1. please help me.

— Reply to this email directly or view it on GitHub https://github.com/ManuelDeLeon/ReactiveArray/issues/3.

ManuelDeLeon avatar Aug 09 '15 14:08 ManuelDeLeon