title: Retrieving object from NSMutableArray based on key value of child NSMutableDictonary
body: <p>So I have an <code>NSMutableArray</code> in my app what is filled like so:</p>
  
  <pre><code>NSMutableArray
  --Object 1 (NSMutableDictonary)
    --Value (i) for key (key)
    --Value (i) for key (key)
  --Object 2 (NSMutableDictonary)
    --Value (i) for key (key)
    --Value (i) for key (key)
  </code></pre>
  
  <p>i need to be able to select an object from within the main <code>NSMutableArray</code> by looking for a key what matches a value of one of the <code>NSMutableDictonary</code>'s keys...</p>
  
  <p>I understand i could run a loop like so to achieve this:</p>
  
  <pre><code>for (NSMutableDictionary *object in arrayObject) {
      if ([[object objectForKey:@"keyToSearch"] integerValue] == keyToCompare) {
          return [object objectForKey:@"keyToReturn"];
      }
  }
  </code></pre>
  
  <p>However my concern is that if this array grows (what it can do) then this will take time to run a search on it..</p>
  
  <p>So I was wondering is there any other way to retrieve the same results but more efficiently?</p>
  
  <p>Thanks</p>
  
  <p>Liam</p>