var nomes:NSArray = []
override func viewDidLoad() {
super.viewDidLoad()
Alamofire.request(.GET, MyUrl,parameters: nil,encoding: .JSON).response { (_, _, data, error) in
self.nomes = try! NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions()) as! NSArray
print(self.nomes)
}
}
And I'm getting this information:
[{"nome":"marcos","idade":"23","altura":"1.83"},
{"nome":"ivan","idade":"25","altura":"1.89"},
{"nome":"pedro","idade":"21","altura":"1.78"}]
I would like to inform on the cell of the TableView "name" in the textLabel field and "height" as detailLabel
cell.textLabel!.text = nomes[indexPath.row].objectForKey("nome")