Looking for a more elegant way to achieve the following task:
myList.forEach(function(element){
if (!['state1', 'state2'].contains(element.state)){
myFilteredList.push(element)
}
})
I was thinking of using $filter('filter') but I'm not sure how to implement it in this case. Any suggestions would be appreciated.
Thank you