js:
var data = [ {id: 10, name: 'user-10'}, {id: 10, name: 'user-10-dupe'}, {id: 15, name: 'w-user-15'}, {id: 20, name: 'user-20'}, ]; var dataUpd = R.pipe( R.uniqBy(R.prop('name')), //R.uniqBy(R.props(['id', 'name'])), //R.uniqBy(R.identity), )(data); alert( JSON.stringify(dataUpd) );
Result: