@Bitliner you should just fallback to regular `filter` for arrays.
You can do it either via
invoke
deferred.map(item, function () { ...}).invoke('filter', Boolean).then(function (res) {
// res is ['string'];
});
or (as it's sync operation) you can just filter your result directly when you have it:
deferred.map(item, function () { ...}).then(function (res) {
res = res.filter(Boolean);
// res is ['string'];
});
Mind that `Boolean` will filter all falsy values (so also empty strings and 0 etc.) if you want to filter just undefined and null, use `function (val) { return val != null; }` instead.
Hope that helps.