matchInList function

In a list of object of the same type, find those that match the input