title: Swift 2.0: Loop through JSON array with NSDictionary
body: <p>I am getting this json from a url, the return JSON is: </p>
  
  <pre><code>[{"id":1,"name":"Mary"},{"id":2,"name":"John"}]
  </code></pre>
  
  <p>My Swift2 Code is:</p>
  
  <pre><code>class ViewController: UIViewController, UITableViewDelegate {
  
      var NumberOfArtists = 0
  
      var NameOfArtist = [String]()
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          parseJSON()
  
      }
  
      func parseJSON(){
  
          do {
  
              let data = NSData(contentsOfURL: NSURL(string: "http://zzzzzz.com/API/name.php")!)
  
              let jsonResult = try NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.MutableContainers)
  
              let NumberOfArtists = jsonResult.count
  
             **LOOP THROUGH THE JSON ARRAY**
  
          } catch let error as NSError {
  
              print(error)
  
          }
      }
  }
  </code></pre>
  
  <p>How can I loop through the JSON array to put which name in a cell on a Table View?</p>
  
  <p>Thanks</p>