title: Loop through a dictionary in swift
body: <p>I'm trying to replicate a for in loop I did in Objective C but am getting an &quot;'AnyObject' does not have a member named 'GeneratorType' error:</p>
  <pre><code> for (NSString *file in [dict objectForKey:@&quot;Files&quot;]){
      NSString *content = [[source stringByAppendingPathComponent:@&quot;Contents&quot;] stringByA
   }
  </code></pre>
  <p>Here is my Swift</p>
  <pre><code> for file in dict.objectForKey(&quot;Files&quot;) {
       let content:String = source.stringByAppendingPathComponent(&quot;Contents&quot;).stringByAppendingPathComponent(file)
   }
  </code></pre>
  <p>I've tried defining a holder variable for the dictionary. Can anyone see what I'm doing wrong here, please?</p>