How can I JSON object inside an array in swift4? How ca I get the response for this JSON in swift4? I am printing the location but its's getting nil.
Here its my JSON data:
{
"Details": [{
"phone":
"id":
}],
"address": [{
"location": "some location"
}]
}
do {
let json = try JSONSerialization.jsonObject(with: data!, options: []) as! [String: AnyObject]
let location = json["location"] as? [[String: AnyObject]]
print(location)
} catch {
print("error")
}