How to get unique values based on a dictionary key, which is an array element in a C object?
eg:
I have an array of elements
aryItem
aryItem[0] = Dictionary{ ItemCategory ItemName ItemPrice } aryItem[1] = Dictionary{ ItemCategory ItemName ItemPrice } ........... ........... aryItem[n] = Dictionary{ ItemCategory ItemName ItemPrice }
Now I want to get only a unique ItemCategory, not duplicates. If I can write [[aryItem objectatIndex: i] valueForKey: ItemCategory], I get all the categories, including the same category. I need only unique categories. I have the option of finding the whole array and then getting unique Itemcategory objects, but I'm looking for any short way to accomplish the same thing.
Thanks.
source share