Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. var collectionObject = [{id: 1}, {id: 2}, {id: 3}, {id: 4}]
  2. var ids = [2,3]
  3.  
  4. _.filter(collectionObject, function(ca){
  5. return _.contains(ids, ca.id)
  6. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement