Currently getting the error "Ambiguous use of 'subscript'" when only building on a real iPhone. Not having any problems when using the simulator. Here is my code:
let url=URL(string:myUrl)
do {
let allContactsData = try Data(contentsOf: url!)
let allContacts = try JSONSerialization.jsonObject(with: allContactsData, options: JSONSerialization.ReadingOptions.allowFragments) as! [String : AnyObject]
if let arrJSON = allContacts["data"] {
for index in 0...arrJSON.count-1 {
let aObject = arrJSON[index] as! [String : AnyObject]
if(ChooseSubject.mineFagKoder.contains(aObject["subject"] as! String)){
ids.append(aObject["id"] as! String)
names.append(aObject["name"] as! String)
subjects.append(aObject["subject"] as! String)
descriptions.append(aObject["description"] as! String)
deadlines.append(aObject["deadline"] as! String)
}
}
}