Let's assume that we have the following object:
const sample = {
foo: {
tags: [
'aaa', 'bbb'
],
a: 1,
b: 10
},
bar: {
tags: [
'ccc', 'ddd'
],
a: 11,
b: 100
}
}
How can one remove a specific tag value from object sample using ramda?
I have done this
/// Remove tag named 'aaa'
R.map(v => R.assoc('tags', R.without('aaa', v.tags), v), sample)
which achieves the desired result but how can I eliminate the lamda (and the closure created) inside map ?