I\'m new ios developer, I want to compare and change attributes
Array1 = (object1,object2, object3, object4) Array2 = (object2,object4, object5, object8)
Compare
You can use sets for this
NSMutableSet *array1Set = [NSMutableSet setWithArray:array1];
NSSet *array2Set = [NSSet setWithArray:array2];
[array1Set intersectSet:array2Set];
You now have a set with just the objects which are in both arrays.
Now you can use enumerateObjectsUsingBlock: on the set to manipulate the objects or convert the set back to an array NSArray *filteredArray = [array1Set allObjects]