Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. let URL = "https://raw.githubusercontent.com/tristanhimmelman/AlamofireObjectMapper/f583be1121dbc5e9b0381b3017718a70c31054f7/sample_array_json"
  2. Alamofire.request(URL).responseArray { (response: DataResponse<[Forecast]>) in
  3.  
  4. let forecastArray = response.result.value
  5.  
  6. if let forecastArray = forecastArray {
  7. for forecast in forecastArray {
  8. print(forecast.day)
  9. print(forecast.temperature)
  10. }
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement