title: Swift Combine Framework - How to properly observe an array?
body: <p>say I have an array of <code>Person</code> structs like this:</p>
  
  <pre class="lang-swift prettyprint-override"><code>struct Person {
      var name: String
  }
  
  var persons = [Person(name: "A"), Person(name: "B"), Person(name: "C")]
  
  let publisher = CurrentValueSubject&lt;[Person], Never&gt;(persons)
  
  // subscribe to changes to the array
  let subscription: AnyCancellable = publisher.sink { (persons) in
      print("The array has changed")
  }
  
  var currentPersons = publisher.value
  currentPersons[0].name = "Changed"
  publisher.send(currentPersons)
  </code></pre>
  
  <p>This works. It publishes every time anything in the array changes or if something is deleted or added.</p>
  
  <p>But what if I wanted to additionally be able to subscribe to only one element in the array? Can I do that? I simply can't figure it out.</p>