Open MahmoudEmarah opened 5 years ago
Hello, Is there any way to map an response array to an object only by it's name as string for example: let URL = "https://raw.githubusercontent.com/tristanhimmelman/AlamofireObjectMapper/f583be1121dbc5e9b0381b3017718a70c31054f7/sample_array_json" Alamofire.request(URL).responseArray { (response: DataResponse<[Forecast]>) in
let forecastArray = response.result.value if let forecastArray = forecastArray { for forecast in forecastArray { print(forecast.day) print(forecast.temperature) } }
} if I have Forecast as String "Forecast" can I do it.
Hello, Is there any way to map an response array to an object only by it's name as string for example: let URL = "https://raw.githubusercontent.com/tristanhimmelman/AlamofireObjectMapper/f583be1121dbc5e9b0381b3017718a70c31054f7/sample_array_json" Alamofire.request(URL).responseArray { (response: DataResponse<[Forecast]>) in
} if I have Forecast as String "Forecast" can I do it.