title: How do I get the lets from the For into a table
body: <p>I can not seem to be able to work out how to use a for and add the data from the for into a table
  Any help would be appreciated </p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController, UITableViewDataSource {
  
      struct Class: Codable {
          let prop_id: String
          let prop_location: String
          let prop_price: String
          enum CodingKeys : String, CodingKey {
              case prop_id = "prop_id"
              case prop_location = "prop_location"
              case prop_price = "prop_price"
          }
      }
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
         // Do any additional setup after loading the view, typically from a nib.
          let url = URL(string: "https://pricepointproperty.co.uk/appServices/service.php")
  
          // Load the URL
          URLSession.shared.dataTask(with:url!, completionHandler: {(data, response, error) in
              // If there are any errors don't try to parse it, show the error
              guard let data = data, error == nil else { print(error!); return }
  
              let decoder = JSONDecoder()
              let classes = try! decoder.decode([Class].self, from: data)
  
              // Print out the classes to the console - try sticking this in a table view :)
              for Properties in classes {
                  print("\t")
                  let id: String = (Properties.prop_id)
                  let location: String = (Properties.prop_location)
                  let price: String = (Properties.prop_price)
                  print(id)
                  print(price)
                  print(location)
              }
          }).resume()
     }
  
      func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return 5
      }
  
      func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let myCell = UITableViewCell()
          myCell.textLabel?.text = "location"
          return myCell
      } 
  }
  </code></pre>