In Swift, if I want to check to see if an object (one that is more complex than a string exists) within an array, how do I do that? Answers found on pages like this (How to check if an element is in an array) don't seem to work in my case.
For example, if I had an object class of Dogs, where each dog had multiple properties (like weight, color, breed, etc.)... and I created several instances of that class and appended them to a single array... how could I then check to see if a certain object was in that array?
if singleDogInstance is in arrayOfDogs {
//do something
}