title: Array is blank when I go to make a table in Swift
body: <p>So when I do a print of the 2 arrays in the get data function, it has the values I want, however, when I go to make the tableview, the count is zero and both arrays are empty. I have been trying to solve this for the last few hours and have also tried NSArrays.</p>
  
  <pre><code>var nameArray = [String]()
  var textArray = [String]()
  
  var urlStart = "https://api.deckbrew.com/mtg/cards?"
  
  
  @IBOutlet weak var cardTitle: UILabel!
  @IBOutlet weak var info: UITextView!
  
  class Card: Mappable {
      var name: String?
      var store_url: String?
      var text: String?
      required init?(_ map: Map) {
      }
      func mapping(map: Map) {
          name &lt;- map["name"]
          store_url &lt;- map["store_url"]
          text &lt;- map["text"]
      }
  }
  
  
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      func getData()
      self.tableView.reloadData()
  
      }
  
  
  func getData() {
  
      let myURLString = "https://api.deckbrew.com/mtg/cards/typeahead?q=sele"
      let myURL = NSURL(string: myURLString)!
  
      var myCardsArray = [Card]()
  
  
  
      let mySession = NSURLSession(configuration: NSURLSessionConfiguration.defaultSessionConfiguration())
      let myDataTask = mySession.dataTaskWithURL(myURL) { (data, response, error) in
          guard error == nil else {
              print("There was error with the task")
              return
          }
          do {
              let jsonData = try NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.AllowFragments)
              for someCard in jsonData as! NSArray{
                  let card = Mapper&lt;Card&gt;().map(someCard)
                  myCardsArray.append(card!)
  
                  self.nameArray.append(card!.name!)
                  self.textArray.append(card!.text!)
  
              }
          } catch {
              print("There was an error")
          }
      }
  
      myDataTask.resume()
  }
  
  
  
  override func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int
  {
      return 1
  }
  
  override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int
  {
     return nameArray.count
  }
  
  override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell
  {
      let cell : TableViewCell! = tableView.dequeueReusableCellWithIdentifier("Card") as! TableViewCell
  
      cell.cardTitle.text = nameArray[indexPath.row] as! String
     cell.cardInfo.text = textArray[indexPath.row] as! String
  
      return cell as TableViewCell
  }
  
  
  
  
  override func didReceiveMemoryWarning() {
  </code></pre>
  
  <p>}
  }</p>