title: Find index of objects array
body: <p>I can't figure out how to find index of object in array. For example I have this data structure:</p>
  
  <pre><code>class Person {
  var name: String
  var age: Int
  
  init(name personName: String, age personAge: Int) {
      self.name = personName
      self.age = personAge
    }
  }
  
  let person1 = Person(name: "person1", age: 34)
  let person2 = Person(name: "person2", age: 30)
  ...
  var personsArray = [person1, person2, ...]
  </code></pre>
  
  <p>I tried to use <code>personsArray.index(where: ....)</code> but I don't understand how to use it. <code>index(of: ...)</code> doesn't work. I think because <code>personsArray</code> doesn't conform to <code>Equatable</code> protocol...</p>