title: How to remove common items from two struct arrays in Swift
body: <p>In my app I have two struct arrays and I want to remove common items from one of them. My struct:</p>
  
  <pre><code>struct PeopleSelectItem {
      var name = ""
      var id = ""
      var added = false
  }
  </code></pre>
  
  <p>My arrays:</p>
  
  <pre><code>var people : [PeopleSelectItem] = []
  var selectedPeople : [PeopleSelectItem] = []
  </code></pre>
  
  <p>I want to remove items from people array if they exist (compare by id) on selectedPeople array. </p>
  
  <p>I tried several array filtering and converting to set but none of them worked. What can I do here?</p>
  
  <p>Thanks!</p>