title: How to fill table with JSON data in Swift 3?
body: <p>I created a tableView in which I want to put news using this link</p>
  
  <pre><code>   https://api.sis.kemoke.net/news
  </code></pre>
  
  <p>There are three things which I want to get and populate the table.</p>
  
  <pre><code>    String title
      String text
      String link
  </code></pre>
  
  <p>Here is my class</p>
  
  <pre><code>    import Alamofire //Framework for handling http requests
      import UIKit
  </code></pre>
  
  <p>/<em>A class which will process http requests, receive the news as string and fill the array with such data which will be displayed in a table</em>/
  class NewsTableViewController: UITableViewController {</p>
  
  <pre><code>//Array which holds the news
  var newsData:Array&lt; String &gt; = Array &lt; String &gt;()
  
  // Download the news
  func downloadData() {
      Alamofire.request("https://api.sis.kemoke.net/news").responseJSON { response in
          print(response.request)  // original URL request
          print(response.response) // HTTP URL response
          print(response.data)     // server data
          print(response.result)   // result of response serialization
  
          //Optional binding to handle exceptions
          if let JSON = response.result.value {
              print("JSON: \(JSON)")
          }
      }
  }
  
  override func viewDidLoad() {
      super.viewDidLoad()
      downloadData()
      extractData()
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
  }
  
  // MARK: - Table view data source
  // Number of sections i table vie
  override func numberOfSections(in tableView: UITableView) -&gt; Int {
      return 1
  }
  
  override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return newsData.count
  }
  
  
  override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
      cell.textLabel?.text = newsData[indexPath.row]
      return cell
  }
  
  // Extract the data from the JSON
  func extractData() {
      Alamofire.request("https://api.sis.kemoke.net/news").responseJSON { response in
          debugPrint(response)
  
          if let json = response.result.value {
              print("JSON: \(json)")
              self.newsData = json as! Array
          }
      }
  }
  
  // MARK: - Navigation
  
  override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
      // Get the new view controller using segue.destinationViewController.
      // Pass the selected object to the new view controller.
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Later-on I will try to get the image as well but for now those three variables should be enough.</p>