I am trying to call an object inside a JSON array using Alamofire. I can get Alamofire to parse my file however, I cannot find the way to get a specific parameter out.
if I use:
Alamofire.request(.GET, "https://example.com//users_result.json")
.responseJSON { response in
print(response.result) // result of response serialization
if let JSON = response.result.value {
print(JSON.count)
print("JSON: \(JSON[1])")
}
}
the code prints out:
> SUCCESS 4 JSON: {
> Age = 22;
> Email = "annahswift@gmail.com";
> Location = "New York";
> MyText = "Love Music";
> Name = Annah;
> Password = 123456;
> REF = 003;
> "Reg_Date" = "2015-07-30";
> Sex = Female;
> Surname = Swift; }
Now, how can I call the parameter 'name'?
print("JSON: \(JSON[1][4])") // nil ??