title: Subtract of two arrays of objects based on the properties of objects
body: <p>Say I have 2 arrays of instances of class "Person". Class Person has properties "name", "age", "id". "id" is a unique identifier, so can be used for comparing of people. 
  So, say I have two arrays of people:</p>
  
  <pre><code>[ {Name: Bob,Age: 18,ID: 142353}, {Name: Rob, Age: 40,ID: 142350}, {Name: Andy, Age: 30,ID: 142359}, {Name: Andy, Age: 21,ID: 142340}  ]
  
  [ {Name: Jack,Age: 18,ID: 142362}, {Name: James, Age: 40,ID: 142311}, {Name: Rob, Age: 40,ID: 142350}, {Name: Andy, Age: 21,ID: 142340}  ]
  </code></pre>
  
  <p>I want to compare the IDs of people and get those, that are different in array 1 from that in array 2, so the result should look like:</p>
  
  <pre><code>[{Name: Bob,Age: 18,ID: 142353}, {Name: Andy, Age: 30,ID: 142359}]
  </code></pre>
  
  <p>The way I am doing this now in Swift is:</p>
  
  <pre><code>   let new = newPeople.filter({ p1 in
                          previousPeople.contains(where: { p2 in
                              p1.id != p2.id
           })
     })
  </code></pre>
  
  <p>But I don't think this is working. Can't figure out what is wrong with my implementation.</p>