title: Casting Syntax to Loop Through Array of Arrays in Swift
body: <p>I have an <code>NSArray</code> consisting of <code>NSArrays</code> of strings created in Objective-C.</p>
  
  <p>I now want to loop through the items in the array in a swift class and am having trouble with the syntax.</p>
  
  <p>The original Objective-C Array of arrays looks like the following:</p>
  
  <pre><code>NSArray* shapes =@[@[@"square",@"square.png"],@[@"circle",@"circle.png"],@[@"square",@"square.png"]];
  </code></pre>
  
  <p>I am able to get and print the Array from the Objective-C class using:</p>
  
  <pre><code>let shapes:Array = Utilities.sharedInstance().getShapes
  </code></pre>
  
  <p>The following to loop through the array, however, is not compiling:</p>
  
  <pre><code>var term : String = ""
  var pic : String = ""
  for shape in shapes  {
  term  = shape[1] //ERROR HERE
  pic = shape[2] //SAME ERROR HERE
              }
  </code></pre>
  
  <p>It gives the error:  <code>Type 'Any' has no subscript members</code>    </p>
  
  <p>What is the proper syntax to loop through the elements?</p>