📅  最后修改于: 2022-03-11 14:57:49.792000             🧑  作者: Mango
Alamofire.request("https://jsonplaceholder.typicode.com/todos/1", method: .get)
.responseJSON { (response) in
switch response.result {
case .success(_):
if let JSON = response.result.value as? [String: Any] {
let status = JSON["completed"] as! Bool
print(status)
}
case .failure(_): break
}
}