I have a class like this :
@interface MyObject : NSObject
@property (nonatomic, strong) NSString *type;
@end
and I am creating an array like this:
NSMutableArray *array = [NSMutableArray array];
MyObject *obj = [[MyObject alloc] init];
obj.type = @"test1";
[array addObject:obj];
MyObject *obj2 = [[MyObject alloc] init];
obj2.type = @"test2";
[array addObject:obj2];
MyObject *obj3 = [[MyObject alloc] init];
obj3.type = @"test1";
[array addObject:obj3];
I would like to filter the array to just have only the objects which have different types, in my example just to have obj1, obj2 and remove the obj3.