My question is pretty simple. How do you spread the result of .map object?
Because I currently have this syntax
let currentObject = ViewsObject.filter(e => e.CurrentView).map(t => t);
And everytime I use the variable "currentObject" I need to use spread operator on it like hits
GetAllMainItems(...currentObject).then(function(GetAllMainItemsResults) {
console.log(GetAllMainItemsResults)
})
And it works perfectly using spread operator evertime I use "currentObject" variable, the problem is I am planning to use it multiple times and I dont want to use spread operator evertime I use it the said variable, So to make it effecient is there a way to use spread operator inside the .map?