im trying to get in Swift the parameters "bicisDisponibles" and "anclajesDisponibles" from this JSON. I have tried many ways to do it but none of them worked.
I have tried this but it doesn't work :(:
Alamofire.request("https://www.zaragoza.es/sede/servicio/urbanismo-infraestructuras/estacion-bicicleta/34.json", method: .get, parameters: ["rf":"html"], encoding: JSONEncoding.default, headers: nil).responseJSON { (response:DataResponse<Any>) in
switch(response.result) {
case .success(_):
if let data = response.result.value{
print(response.result.value)
}
break
case .failure(_):
print(response.result.error)
break
}
}
I want to get it like a var
to put it on an UILabel
:)