I have a collection,
var users = [
{'user': 'Mike', 'age': 11, 'description': 'Null'},
{'user': 'Kiddo', 'age': 36, 'description': 'Not Available'},
{ 'user': 'Jack', 'age': 36, 'description': 'test'}
];
How can use lodash library to remove the entries which has 'description' :'Not Available' ?
Edit 1 : Tried using the below ,
function removeItemsByAttrValue (collection, attrValue, matchValue) {
return _.filter(collection, val => val.attrValue !== matchValue);
}
Invoked it like,
removeItemsByAttrValue (users, 'description', 'Not Available');
Somehow, this didn't filter the item.