I have array of objects like this
var users = [
{ 'user': 'barney', 'age': 36, 'active': true , 'company':'abc' },
{ 'user': 'fred', 'age': 40, 'active': false, 'company':'pqr' },
{ 'user': 'pebbles', 'age': 1, 'active': true, 'company':'xyz' }
];
i want filter the array of objects where company is abc or xyz so the result should be like this
[
{ 'user': 'barney', 'age': 36, 'active': true , 'company':'abc' },
{ 'user': 'pebbles', 'age': 1, 'active': true, 'company':'xyz' }
];
i am using the loadash like this
console.log(_.filter(users, {'company': 'xyz','company': 'abc'}))
It is not filtering correctly. can anybody help me on this.