you should use _.filter() before _.map()
var filteredArray = _.filter(myArray,function(obj) {
return !obj.ignore;
});
var finalArray = _.map(filteredArray, function(obj) {
return obj.myProperty;
});
you should use _.filter() before _.map()
var filteredArray = _.filter(myArray,function(obj) {
return !obj.ignore;
});
var finalArray = _.map(filteredArray, function(obj) {
return obj.myProperty;
});