(
{
color = blue;
},
{
color = blue;
},
{
color = red;
},
{
color = white;
}
)
This is an Array of dictionary, i have to remove duplicate dictionary from array corresponding to key color.
NSSet
is to save you in this case. Use:
NSSet *set = [NSSet setWithArray:duplicateArray];
NSArray *uniqueArray = [set allObjects];
Avoid using loop for this because if you have more object loop is a consuming process. You can directly use NSSet
and it will work for sure.