After much looking, it seems that If I want to correlate a tableView indexPath to an Annotation array, I have to check for similar features. Therefore, I'm deciding to check if the Pin array (of pin class) has a pin with a title equal to the name of the selected tableCell.

However, whenever I set up my function like so:

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let restaurant = restaurantArray[indexPath.row] let restaurantName = restaurant.value(forKey: "Name") as!String ? if pinArray.contains(pin.title = restaurantName) { print("Found") } else { print("Nope") } }

I am unable to see if the Pin array contains a pin with a title equal to restaurantName. Whether their be issues with bool, optionals, or other, I'm still trying to figure out how to find a pin with the same title as restaurantName.