How can i remove an object from array of objects in app.delete using express

filter does not change the original array, it creates a new array based on the filter you provided.

You could set the games array to the now filtered array, and that would remove the object.

games = games.filter(function (el) {
  return el.id !== id;
});

res.send({ rest: games });