The way I am removing elements from my array right now is this
var indexToRemove = newSections.indexOf(newSections.find((section) => section.id === parseInt(sectionId)));
newSections.splice(indexToRemove, 1);
However, I want to be able to remove my elements as such.
array.remove(element)
How can I accomplish something like this?