title: Alamofire + Swift in UICollectionView
body: <p>I had no idea how to parse JSON data using Alamofire. Right now I successfully request the data from web service. The problem is I'm not really sure how to embed/parse json (image) data into UICollectionView</p>
  
  <pre><code>import UIKit
  import Alamofire
  
  class PopularViewController: UIViewController,UICollectionViewDataSource, UICollectionViewDelegate {
  
      var users: [AnyObject] = []
  
      func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
          //#warning Incomplete method implementation -- Return the number of items in the section
          return users.count
      }
  
      func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
          let cell = collectionView.dequeueReusableCellWithReuseIdentifier("UserCell", forIndexPath: indexPath) as PopularCollectionViewCell
  
          Alamofire.request(.GET, "http://xxxxx/users.json").responseJSON { (_, _, data, _) in
              println(data)
  
          }
          return cell
      }
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
      }
  }
  </code></pre>
  
  <p>Json Data</p>
  
  <pre><code>{
      "users": [{
          "userId": 1,
          "profilePhoto": "https://graph.facebook.com/1301454197/picture?type=large"
      }]
  }
  </code></pre>