func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

    let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath)
    let label = cell.contentView.viewWithTag(1) as? UILabel
    let photo = cell.contentView.viewWithTag(3) as? UIImageView
    label.text = articles[indexPath.row]["name"] as? String ←※ここでエラー

    if let star = cell.contentView.viewWithTag(starTag) as? AXRatingView {
        star.value = 1.5
    } else {
        star(cell, photo: photo!)
    }

    return cell
}

func getData() {

    Alamofire.request(.GET, "http://sample.jp/api", headers: appDelegate.customHeader)
        .responseJSON { respone in
            guard let object = respone.result.value else {
                print("取得に失敗しました")
                return
            }
            self.articles = []
            let json = JSON(object)
            json["result"]["object"].forEach { (_, json) in
                let article: [String: AnyObject?] = [
                    "id" : json["id"].string!,
                    "name": json["name"].string!,
                    "start_date": json["start"]["date"].string!,
                    "end_date": json["end"]["date"].string!
                ]
                self.articles.append(article)
            }
            self.myTable.reloadData()
    }

}

上記のコードでviewDidLoad内でgetDataメソッドを呼び出しているのですが
どうも情報の取得より先にテーブルの生成が行われ、nilを代入しようとしエラーが出てしまいます。

似た処理を他のViewで処理しようとした際はうまくいっています。
どうしたら情報の取得後にテーブルの生成に移れるでしょうか。


こちらがうまくいく側のコードです

func tableView(table: UITableView, didSelectRowAtIndexPath indexPath:NSIndexPath) {

    appDelegate.selectedId = (articles[indexPath.row]["id"] as? String)!

}

func getAllData() {

    Alamofire.request(.GET, "http://sample.jp/api/search", headers: appDelegate.customHeader)
        .responseJSON { respone in
            guard let object = respone.result.value else {
                print("一覧の取得に失敗しました")
                return
            }
            self.articles = []
            let json = JSON(object)
            json["result"].forEach { (_, json) in
                let article: [String: AnyObject?] = [
                    "id" : json["id"].string!,
                    "name": json["name"].string!,
                    "start_date": json["start"]["date"].string!,
                    "end_date": json["end"]["date"].string!
                ]
                self.articles.append(article)
            }
            self.myTable.reloadData()
    }

}