title: How to get unique values based on dictionary key, which is an element of an array in objective C?
body: <p>How to get unique values based on dictionary key, which is an element of an array in objective C ?</p>
  
  <p>for example:</p>
  
  <p>i am having an array of an Items</p>
  
  <p>aryItem</p>
  
  <pre><code>  aryItem[0] = Dictionary{
  
                 ItemCategory
                 ItemName
                 ItemPrice
  
                 }
  
    aryItem[1] = Dictionary{
  
                 ItemCategory
                 ItemName
                 ItemPrice
  
                 }
  
     ...........
     ...........
    aryItem[n] = Dictionary{
  
                 ItemCategory
                 ItemName
                 ItemPrice
  
                 }
  </code></pre>
  
  <p>Now i want to get only unique ItemCategory , not duplicates. If i can write [[aryItem objectatIndex:i] valueForKey:ItemCategory] i get all categories, same category also included in this. I need only unique categories. I have an option searching whole array and then get unique Itemcategory objects, but i am looking for any short way to accomplish the same thing.</p>
  
  <p>Thanks.</p>