I have an array like this:
$scope.emails = [
{\"key\":\"Work\",\"value\":\"user@domine.com\"},
{\"key\":\"\",\"value\":\"\"},
{\"key\":\"Work\",\"value\":
I haven't tried this with AngularJs, but with Angular 4 a similar way of this works pretty well.
angular.forEach($scope.emails, function(email){
if(email.value ===""){
$scope.emails.splice($scope.emails.indexOf(email), 1);
}
});
Angular 4 version:
this.emailArray.forEach(email => {
if (email.value == "") {
this.emailArray.splice(this.emailArray.indexOf(email),1);
}
});