title: How can I fix this? Cast from '[String]' to unrelated type '[String : AnyObject]' always fails
body: <p>I can't seem to find the solution to this, there are hundreds of answers but none that I can find related to this simple problem.
  Whatever I do to try to put the dictionary into a string, fails?
  <strong>Original Text</strong>:</p>
  
  <pre><code>let jsonResult = try JSONSerialization.jsonObject(with: data!, options: JSONSerialization.ReadingOptions.mutableContainers)
  let jsonString = (jsonResult as AnyObject).components(separatedBy: "")                           
  let jsonDict = jsonString as! [String: AnyObject]
  //let jsonDict = jsonString as! [String: AnyObject]
  //let jsonDict = jsonString as! Dictionary&lt;String,String&gt;
  //Cast from '[String]' to unrelated type 'Dictionary&lt;String, String&gt;' always fails 
  </code></pre>
  
  <p><strong>The full code</strong>, now sort of working after @Vadian's fix.</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController {
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      searchForMovie(title: "pulp_fiction")
  }
  
  func searchForMovie(title: String){
      //http://www.omdbapi.com/?t=pulp+fiction
      if let movie = title.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed){
          let url = URL(string: "https://www.omdbapi.com/?t=\(movie)&amp;i=xxxxxxxx&amp;apikey=xxxxxxxx")
          // this url contains the omnbapi keys which are free/
  
          let session = URLSession.shared
          let task = session.dataTask(with: url!, completionHandler: { (data, response, error) in
              if error != nil {
                  print(error!)
              } else {
                  if data != nil {
                      do {
                         let jsonResult = try JSONSerialization.jsonObject(with: data!, options: .allowFragments)
                         if let jsonResult = try JSONSerialization.jsonObject(with: data!, options: .allowFragments) as? String {
                              let jsonArray = jsonResult.components(separatedBy: "")
                              print(jsonArray)
                          } else {
                              print("This JSON is (most likely) not a string")
                          }
  
                         let jsonDict = jsonResult as! [String: Any]
  
                          DispatchQueue.main.async {
                          print(jsonDict)
                          }
                      } catch {
                      }
                  }
              }
          })
          task.resume()
      }
  }
  }
  </code></pre>
  
  <p><strong>The Result of this is:</strong></p>
  
  <pre><code>This JSON is (most likely) not a string
  ["Poster": https://m.media-
  
  amazon.com/images/M/MV5BNGNhMDIzZTUtNTBlZi00MTRlLWFjM2ItYzViMjE3YzI5MjljXkEyXkFqcGdeQXVyNzkwMjQ5NzM@._V1_SX300.jpg, "BoxOffice": N/A, "Language": English, Spanish, French, "Year": 1994, "Metascore": 94, "Director": Quentin Tarantino, "Rated": R, "Runtime": 154 min, "Genre": Crime, Drama, "imdbVotes": 1,548,861, "Ratings": &lt;__NSArrayI 0x604000256a10&gt;(
  {
      Source = "Internet Movie Database";
      Value = "8.9/10";
  },
  {
      Source = "Rotten Tomatoes";
      Value = "94%";
  },
  {
      Source = Metacritic;
      Value = "94/100";
  }
  )
  , "Released": 14 Oct 1994, "imdbRating": 8.9, "Awards": Won 1 Oscar. Another 62 wins &amp; 69 nominations., "Actors": Tim Roth, Amanda Plummer, Laura Lovelace, John Travolta, "Response": True, "Country": USA, "Plot": The lives of two mob hitmen, a boxer, a gangster's wife, and a pair of diner bandits intertwine in four tales of violence and redemption., "DVD": 19 May 1998, "Title": Pulp Fiction, "Writer": Quentin Tarantino (stories), Roger Avary (stories), Quentin Tarantino, "Production": Miramax Films, "imdbID": tt0110912, "Website": N/A, "Type": movie]
  </code></pre>