title: Return data from Alamofire.request()
body: <p>I work with Alamofire and SwiftyJSON and have function:</p>
  
  <pre><code>func getCitiesFromServer(){
  
      Alamofire.request("mysite", method: .get, encoding: JSONEncoding.default, headers: nil)
          .responseJSON { response in
  
              switch response.result {
              case .success:
                  var json = JSON(response.result.value!)
  
                  for i in 0..&lt;json["cities"].count {
  
                      self.dictOfCities[json["cities"][i]["id"].int!] = json["cities"][i]["name"].string
                  }
  
  
              case .failure(let error):
                  print(error)
              }
  
      }
  
  }
  </code></pre>
  
  <p>And I'd like to work with <code>dictOfCities</code> when I create <code>tableView</code>, but how return <code>dictOfCities</code> in <code>getCitiesFromServer()</code>? I try <code>print(dictOfCities)</code> at the end of <code>getCitiesFromServer()</code>, but see only <code>[:]</code>, but in part <code>case .success:</code> I see good key-value.</p>