Can't keep data in the array when adding new. This code is in a loop btw
let placeHolder = facArray[key].filter(i => i.M == map).map(i => i.W)
mapArray[map] = [...placeHolder]
I am trying to store data in an array with the value of map as an index and I would like to push data to it this is in a loop btw but it keeps removing the previous data how do I keep the previous data while adding to it