Functional approach of removing items in a list based on nested property values
I just got a pull request for R.pathEq
merged. It won't be usable until the next release of ramda.js (current version is 0.6.0) but meanwhile you can recreate it like this:
var pathEq = R.curry(function(path, val, obj) {
return R.eq(val, R.path(path, obj));
});
And then use it like so:
var rejectThis = 'userName1';
var myFilter = R.useWith(R.reject, pathEq('providers.github.login'):
var filteredList = myFilter(rejectThis, users);