title: Removing duplicates from NSMutableArray
body: <p>I have this problem with removing duplicate objects from an array. 
  I tried these already: </p>
  
  <pre><code>noDuplicates = _personalHistory.personalHistory;
  
  for (int i=[noDuplicates count]-1; i&gt;0; i--) {
      if ([noDuplicates indexOfObject: [noDuplicates objectAtIndex: i]]&lt;i)
          [noDuplicates removeObjectAtIndex: i];
  }
  
  
  for (PersonalHistory_artikels *e in _personalHistory.personalHistory) {
      if (![noDuplicates containsObject:e]) {
          NSLog(@"Dubplicates");
          [noDuplicates addObject:e];
      }
  }
  
  
  for (i=0; i&lt;_personalHistory.personalHistory.count; i++) {
      PersonalHistory_artikels *test = [_personalHistory.personalHistory objectAtIndex:i];
      for (j=0; j&lt;_personalHistory.personalHistory.count; j++) {
          PersonalHistory_artikels *test2 = [_personalHistory.personalHistory objectAtIndex:j];
          if (! [test.nieuwsTITLE_personal isEqual:test2.nieuwsTITLE_personal]) {
              NSLog(@"Add test = %@", test.nieuwsTITLE_personal);
              [noDuplicates addObject:test];
          }
      }
  }
  </code></pre>
  
  <p>But none of the above gave me the right array. The last one was the best, but it still showed duplicate values. Can someone help me with this problem? 
  Thank you very much. </p>