title: Swift3 - Could not cast value of type '__NSArrayI' (0x107009dd8) to 'NSDictionary' (0x10700a2d8)
body: <p>This is my function:</p>
  
  <pre><code>func locais(){
      var x: Int=0
      let tal = "http://localhost/cmios/api/mapa/\(id1)"
      print(tal);
      let url1 = URL(string: tal)
      let task1 = URLSession.shared.dataTask(with: url1!) { data, response, error in
          guard error == nil else{
              print(error!)
              return
          }
          guard let data = data else{
              print("Data is wrong")
              return
          }
          let json1 = try! JSONSerialization.jsonObject(with: data, options: []) as! [String:Any]
          let dados1 = json1["dados"] as? [[String: Any]]
  </code></pre>
  
  <p>The JSON that I want to return:</p>
  
  <pre><code>[{"id_animal":"9","latitude":"41.701497","longitude":"-8.834756","nome":"testeFinal"},{"id_animal":"10","latitude":"41.701497","longitude":"-8.834756","nome":"testeFinal"}]
  </code></pre>
  
  <p>And this is the error</p>
  
  <pre><code>Could not cast value of type '__NSArrayI' (0x107009dd8) to 'NSDictionary' (0x10700a2d8).
  </code></pre>
  
  <p>Can anyone help?</p>