I'm trying to filter this large dataset down and I've run into a problem.vI'm using the MovieLens uesr ratings dataset and cut it down to about 10000 entries and removed the timestamp column.
The data is stored like ["userId":1,"movieId":1,"rating":1] and I have an array of duplicate values that are most commonly coming up. I want to remove all elements that don't match one of the 8 values in the duplicate list dupList. I don't really use filters that often and I've tried this but it didnt work.
var filtered = movieDataArray.filter(
function(e) {
// console.log(e);
return this.indexOf(e.movieId) < 0;
},
dupList
);
I've also tried a few lodash functions, intersect, union, etc. in the vain hope that one of them would work. Any help would be appreciated.