title: How to get data from local JSON file in swift?
body: <p>I want to get data from local JSON file. It's look like:</p>
  
  <pre><code>[
  [
  {
    "link": "link1",
    "answers": [
      "answer1",
      "answer2",
      "answer3",
      "answer4",
      "answer5"
    ],
    "questions": "question1"
  },
  {
    "link": "link2",
    "answers": [
      "answer1",
      "answer2",
      "answer3",
      "answer4",
      "answer5"
    ],
    "questions": "question2"
  }
  ]
  ]
  </code></pre>
  
  <p>How can I take separately each element?
  And how can I take separately each answer?
  I want to use answers in table view.
  indexPath.row[1] = answer1
  indexPath.row[2] = answer2...</p>
  
  <pre><code>let url = Bundle.main.url(forResource: "info", withExtension: "json")!
      do {
          let jsonData = try Data(contentsOf: url)
          let json = try JSONSerialization.jsonObject(with: jsonData)
          print(json)
  
          //let current = json["title"] as! [String: [String:Any]]
  
          //for (key, currency) in current {
              //let quest = currency["title"] as! String
              //let img = currency["image"] as! String
              //let ans = currency["answers"] as! [String]
          //}
      }
      catch {
          print(error)
      }
  
  }
  </code></pre>