title: Type 'AnyObject' does not conform protocol 'sequenceType'
body: <p>So this is my code, I get an error in the following line, saying "Type 'AnyObject' does not conform protocol 'sequenceType'":</p>
  
  <pre><code>for bar in allBars {
  </code></pre>
  
  <p>I tried the solution proposed here (<a href="https://stackoverflow.com/questions/25563655/type-anyobject-does-not-conform-to-protocol-sequencetype">Type &#39;AnyObject&#39; does not conform to protocol &#39;SequenceType&#39;</a>) but it causes Xcode to bug</p>
  
  <p>I'm very new on IOS so this might be some stupid stuff</p>
  
  <pre><code>func loadBars(){
      let path = NSBundle.mainBundle().pathForResource("donnes", ofType: "json")
      let filename: String = "donnees.json"
  
      do{
          let data = try NSData(contentsOfFile: path!, options: NSDataReadingOptions.DataReadingMapped)
          do{
              let bars: AnyObject? = try NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions())
              if let bars = bars as? Dictionary&lt;String, AnyObject&gt; {
                  print(bars)
  
                  let allBars = bars["bars"]
  
                  for bar in allBars {
  
                      let nouveauBar = Bar(id: bar["id"], name: bar["name"], adress: bar["adress"], url: bar["url"], image_url: bar["image_url"], tags: bar["tags"], longitude: bar["longitude"], latitude: bar["latitude"])
  
                      bars += nouveauBar
                  }
  
              } else {
                  print("Level file '\(filename)' is not valid JSON")
              }
          }catch {
              print("Level file '\(filename)' is not valid JSON: \(error)")
          }
  
  
      }catch {
          print("Could not load level file: \(filename), error: \(error)")
      }
  
  }
  </code></pre>
  
  <p>And here is the beginning of the .json file:</p>
  
  <pre><code>{
  "code": 200,
  "bars": [{
      "id": 1627,
      "address": "100 Rue Saint-Martin, 75004 Paris, France, Opera and Les Halles, Paris",
      "name": "Caf\u00e9 Beaubourg",
      "url": "/bar/paris/opera-and-les-halles/cafe-beaubourg",
      "image_url": "https://prh-wbb-prod.s3.amazonaws.com/generic_640_480/WBB%20holding%20image3_54abcf7d218d1_55b8d2128eabb.jpg",
      "tags": "Bar, Gay, Cafe, Dinner, Lunch",
      "latitude": 48.860033826521,
      "longitude": 2.3508920416641
  }, {
      "id": 1259,
      "address": "19 Rue Beaubourg, 75004 Paris, France, Bastille and the Marais, Paris",
      "name": "Georges",
      "url": "/bar/paris/bastille-and-the-marais/georges",
      "image_url": "https://prh-wbb-prod.s3.amazonaws.com/generic_640_480/WBB%20holding%20image4_54abcf6d1f68d_55b8d2015bb13.jpg",
      "tags": "Serves Food, Great View, Rooftop, Terrace, Rock",
      "latitude": 48.8603,
      "longitude": 2.35097
  }]
  </code></pre>
  
  <p>}</p>