Ramda reject

Ramda reject is opposite to filter.

js:

var data = [
 {fname: 'Roy', lname: 'Red'},
 {fname: 'Gary', lname: 'Green'},
 {fname: 'Bob', lname: 'Blue'},
 {fname: 'Roy', lname: 'Rudy', alt: 'Alt'},
];
 
var dataUpd = R.pipe(
  R.reject(R.propEq('fname', 'Roy')),
)(data);
 
alert( JSON.stringify(dataUpd) );

Result:

Leave a Reply

Your email address will not be published. Required fields are marked *