title: Swift 2 - how to get data from Alamofire.responseJSON
body: <p>I'm reading Design+Code course and Ihave 2 files: </p>
  
  <ol>
  <li>DNService.swift</li>
  <li>StoriesTableViewController.swift</li>
  </ol>
  
  <p>Form the DNService I'm loading data from DesignerNews API, here is the function who get the data :</p>
  
  <pre><code>static func storiesForSection(section: String, page: Int, response: (JSON) -&gt;()) {
  
      let urlString = baseURL + ResourcePath.Stories.description + "/" + section
      let parameters = [
          "page": String(page),
          "client_id": clientID
      ]
  
  
  
      Alamofire.request(.GET, urlString, parameters: parameters).responseJSON { (response) -&gt; Void in
          let swiftyData = JSON(response.result.value ?? [])
          //print(swiftyData)
      }
  
  
  }
  </code></pre>
  
  <p>In the <code>StoriesTableViewController</code>, I call the function <code>storiesForSection()</code> but it don't retrieve the data :</p>
  
  <pre><code>var stories: JSON! = []
  
  func loadStories(section: String, page: Int) {
      DNService.storiesForSection(section, page: page) { (JSON) -&gt; () in
          self.stories = JSON["stories"]
          self.tableView.reloadData()
      }
  }
  </code></pre>
  
  <p>I don't know how to fill <code>self.stories</code> in my <code>StoriesTableViewcontroller</code>...</p>
  
  <p>I tried to store swiftyData in a var of DNService and make a <code>getStoredSwiftyData()</code> in <code>StoriesTableViewCtler</code> but it doesn't works too.</p>