Answer the question
In order to leave comments, you need to log in
How to pass an argument to one of the composition functions of the Ramda library?
Hello, is there a way to pass arguments to one of the functions included in the composition of the Ramda library?
Here is an example
- there is an array of filter objects
const filter = [
{
"name": "custName",
"value": "\"8905040452, 2810003613\""
},
{
"name": "region",
"value": "[9,34,25,4,96,15,120,83,105,122,35,81,12,95,2,14,86,101,82,23,118]"
}
]
const filterInnR = R.compose(
R.pluck('value'),
R.filter(R.where({
name:R.equals('custName')
})
)
)
console.log(filterInnR(filter))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question