I am getting this error at the line if let arrJson = allContacts["contacts"]
in the below code:
if let arrJson = allContacts["contacts"] {
for index in 0...arrJson.count - 1
{
let aObject = arrJson[index] as! [String : AnyObject]
names.append(aObject["name"] as! String)
contacts.append(aObject["email"] as! String)
}
}
Please help me what to do? I have tried this one but not solved this error Type 'Any' Has no Subscript Members in xcode 8 Swift 3