Add this and your problems will be solved
.reduce(function(p,c){
return {...p,...c};
},{})
Your code will look like this after adding the above code
rates.map(rate => {
return {
[rate]: account.vent.filter(v => v.rate === rate)[0]
?.vat,
}
})
.reduce(function(p,c){
return {...p,...c};
},{})
* Be the first to Make Comment