I have an array for example
const array = [
{
"id": 1
},
{
"id": 2
}
]
I want to add a new property to that based on the value at the same index in array2 using Ramda.
const array2 = [
{
0: 'Test'
},
{
1: 'Test2'
}
]
I want the output to be:
const result = [
{
"id": 1,
"name": 'Test'
},
{
"id": 2,
"name": 'Test2'
}
]
I have got to something like this so far but not sure how I map the value.
const fn = R.map(R.assoc('name', value??));
const result = fn(array1);