Odfiltruj tablice JS

let newArray = array.filter(function(item) {
  return condition;
});
Philan ISithembiso