I have an array of current animal objects that can be viewed by day – for example, monday will return all animals that are available on a monday, etc.
I also have an array of saved animal objects.
How do I ensure that the saved animals don’t show up in the current animals list?
Something like, if the currentAnimal.name isEqual to savedAnimal.name?
I need the objects in both arrays so it is important to compare the .name properties, I think?
Override isEqual and hash to do a comparison on the name if that is what you consider to make the objects ‘equal’.
and