estrutura do JSON
[{
"ID": 9,
"Make": "Chevrolet",
}]
ex:
struct GlobalArray{
let id: Int?
let make: String?
init(dictionary: [String: Any]) {
id = dictionary["ID"] as? Int
make = dictionary["Make"] as? String }
Alamofire.request("JSON.TESTE", method: .get).responseJSON { (response) in
switch response.result {
case .success:
if let resposta = response.result.value as? Dictionary<String, Any> {
do{
let global = GlobalArray(dictionary: resposta)
print(global.make!)
}
}