I\'m trying to follow the steps found here on comparing two arrays, and knowing when to create a new object, but I just don\'t understand how it works:
<
Something like this:
NSArray *wholeList = [[NSArray alloc]initWithObjects:@"employee1", @"employee2", @"employee3", @"employee4", @"employee5",@"employee6", nil];
NSArray *partialList = [[NSArray alloc]initWithObjects:@"employee2", @"employee13", @"employee7", nil];
for (id employeeID in partialList) //get one employee from the partialList
{
if (![wholeList containsObject:employeeID]) //check to see if it is in the wholeList
{
NSLog(@"This employee is not in the wholeList: %@", employeeID);
// do create new employee object for this employeeID, whatever...
}
}