NSArray *array = [[NSArray alloc] initWithObjects:@"12",@"2",@"3",@"2",@"1",@"5", nil]; NSSet *uniqueElements = [ NSSet setWithArray :array ]; for (id element in uniqueElements ) { NSLog(@"%@",element); } }