title: Looping an array of NSDictionaries in swift
body: <p>Ok, trying to catch the last train to learn Swift, I have seen similar questions but I am not getting them to solve my issue.</p>
  
  <p>I have an <code>NSDictionary</code> called <code>entries</code>, and one of the values, corresponding to key <code>"TYPES"</code> is an <code>NSArray</code> of NSDictionaries. I am trying to loop over this latter <code>NSDictionary</code> and retrieve an integer value for the key <code>"TID"</code>, I am doing:</p>
  
  <pre><code>for dict in entries["TYPES"] as NSDictionary {
     let tid : Int = typeDict["TID"]
  }
  </code></pre>
  
  <p>But I am receiving as error: <code>(key: AnyObject, value: AnyObject)</code> does not have a member named 'subscript'</p>
  
  <p>I understand this is due to <code>entries["TYPES"]</code> being <code>anyObject!</code> and comes from Xcode 6 beta 6, where a large number of Foundation APIs have been audited for optional conformance and hence need unwrapping but I have tried my best to unwrap without success, the compiler is always complaining a different thing. Someone knows how to do this?</p>