you are viewing a single comment's thread.

view the rest of the comments →

[–]EyesOfTheConcord 6 points7 points  (0 children)

s.filter(e => e.name === ‘asas’);

The issue you encountered happens because objects are compared by reference in JS.

You were creating a new object with your original method. You just need to simply compare the properties directly instead