I have this array
$scope.userEventData.selectedFlats
and there's an other array $scope.flatsArray
I want to remove values from $scope.userEventData.selectedFlats
that are present in $scope.flatsArray
.
I have done this:
$scope.userEventData.selectedFlats = $scope.userEventData.selectedFlats.filter(function(f){
return !$scope.someObj.flatsArray.some(function(v){
return v.indexOf(f) >= 0;
})
})
But I get an error saying v.indexOf is not a function