Javascript: Remove objects from list based on certain combinations of a object in the same list I have a list which can have the following kinds of values: