response.Result.Value Alamofire 5

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

            }
    }
Enthusiastic Echidna