0
jaman posted
how to get value of two dimensional mutable array in ios swift
getting the data from api
self.data = parseJSON["data"] as! NSMutableArray
data have mutlidimension array like this
{
{
data1 = 20;
data2 = "description is here son dont worry asdf sfsdfsfdg";
id = 2;
} ,
{
data1 = 20;
data2 = "description is here son dont worry asdf sfsdfsfdg";
id =32;
}
}
so now i want to set the data at tableview cell
let mycell:BookTokenTableViewCell = tableView.dequeueReusableCell(withIdentifier: "cell") as! BookTokenTableViewCell
mycell.amount.text=(self.data[indexPath.row] as! NSMutableArray ).value(forKey: "amount") as! String
but getting error at run time