title: JSON Parsing Swift using JSONPlaceholder
body: <p>I'm playing with Swift and JSONPlaceholder. I want to retrieve all the data contained in: <a href="https://jsonplaceholder.typicode.com/photos" rel="nofollow noreferrer">https://jsonplaceholder.typicode.com/photos</a></p>
  
  <p>I created a function that is acceding to the url, downloading the JSON but then I don't know how can I obtain the title and the thumbnailUrl to pass then for populate the tableView. In the past I used this code but now it's not working because on the JSONPlaceholder there are no array.</p>
  
  <p>Any help for re-arrange the code for read and obtain the jsonplaceholder elements? </p>
  
  <pre><code>func loadList(){
  
      let url = URL(string: urlReceived)
  
      var myNews = NewInfo()
  
      let task = URLSession.shared.dataTask(with: url!) {
          (data, response, error) in
  
          if error != nil{
              print("ERROR")
          }
          else{
              do {
                  if let content = data{
                      let myJson = try JSONSerialization.jsonObject(with: content, options: .mutableContainers)
  
                      //print(myJson)
                      if let jsonData = myJson as? [String : Any] {
  
                          if let myResults = jsonData["list"] as? [[String : Any]]{
                              //dump(myResults)
  
                              for value in myResults{
                                  //Read time string from root
                                  if let time = value ["dt_txt"] as? String{
  
                                      myNews.time = time
                                  }
                                  //Read main container
                                  if let main = value["main"]
                                      as? [String : Any]{
                                      if let temperature = main["temp"] as? Double {
                                          myNews.temperature = String(temperature)
                                      }
                                  }
                                  //Read from weather container
                                  if let weather = value["weather"] as? [[String: Any]]{
                                      for value in weather{
                                          if let weatherContent = value["description"] as? String{
                                              myNews.weatherDescription = weatherContent
                                          }
                                      }
                                  }
  
  
                                  self.myTableViewDataSource.append(myNews)
  
                              }
                              dump(self.myTableViewDataSource)
  
                              DispatchQueue.main.async {
                                  self.tableView.reloadData()
                              }
  
                          }
  
                      }
                  }
              }
              catch{
  
              }
          }
      }
      task.resume()
  }//End func
  </code></pre>