Possuo a seguinte request que me retorna um json nao consigo pegar as ulrs de live
Alamofire.request(urlRequest).validate().responseJSON { response in
print(response.data)
do {
if let data = response.data,
let json = try JSONSerialization.jsonObject(with: data) as? [String: Any],
let live = json["live"] as? [[String: Any]] {
for live in live {
if let livesUrl = live["live"] as? String {
self.urlLive.append(liveUrl)
}
}
}
} catch {
print("Error deserializing JSON: \(error)")
}
print(self.urlLive)
}
JSON QUE A REQUEST ME RETORNA
[ { "id": "1", "description": "TESTE 1", "live": "https://.....", "thumb": "https://.....", "online": true }, { "id": "2", "description": "TESTE 2", "live": "https://.....", "thumb": "https://.....", "online": true }]