I am getting issues of Ambiguous use of 'subscript' as per mentioned in Screen Shot that is attached here. I am trying to use Alamofire for api calling. is there any issues of xcode 8 ? i am using swift 3 with xcode 8 in IOS 10. Will anybody please help me to fix this issue?

if let tracks = readableJSON["tracks"] as? JSONStandard
{
if let items = tracks["items"] as? NSArray
{
for i in 0..<items.count
{
let item = items[i] as? JSONStandard
let name = item?["name"] as! String
names.append(name)
self.tableView.reloadData()
}
}
}
I got my answer with line
if let items = tracks["items"] as? NSArray instead of if let items = tracks["items"]
Here Simulator takes types itself and for device we have to specify data type as i have writtern as? NSArray for items
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With