title: programatically making a 2d array in swift
body: <p>I need to use a for loop to create a 2d array. So far "+=" and .append have not yielded any results. Here is my code. Please excuse the rushed variable naming.</p>
  
  <pre><code>let firstThing = contentsOfFile!.componentsSeparatedByString("\n")
  
  var secondThing: [AnyObject] = []
  
  for i in firstThing {
      let temp = i.componentsSeparatedByString("\"")
      secondThing.append(temp)
  }
  </code></pre>
  
  <p>The idea is that it takes the contents of a csv file, then separates the individual lines. It then tries to separate each of the lines by quotation marks. This is where the problem arises. I am successfully making the quotation separated array (stored in temp), however, I cannot make a collection of these in one array (i.e. a 2d array) using the for loop. The above code generates an error. Does anybody have the answer of how to construct this 2d array?</p>