I have the following request that returns me a json I can not get the ulrs of 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 REQUEST RETURNS
[ { "id": "1", "description": "TEST 1", "live": "https: // .....", "thumb": "https: // .....", "online": true }, { "id": "2", "description": "TEST 2", "live": "https: // .....", "thumb": "https: // .....", "online": true }]