How can check if an array of objects have a key value using underscore.

Example:

var objects = [
  {id:1, name:'foo'},
  {id:2, name:'bar'}
]

check(objects, {name: foo}) // true

I think it should be made using map:

_.map(objects, function(num, key){ console.log(num.name) });
Edit
Report