title: Populate the tableView with JSON data
body: <p>Here i am trying to load the table view with JSON data but data is not showing up. I don't know where the problem is i think i am not getting data into array properly.Tried a lot but not getting what i am doing wrong.New to iOS.</p>
  
  <p>Below is my <strong>JSON data:</strong> </p>
  
  <blockquote>
    <p>{"total_images_count":266,"datetime_value":"2016-07-15
    19:28:37","total_count_response":"","image_path":"http://www.expert.com/test/images/","task":[{"image_name":"file1","image_path":"1461468362622.jpg"},{"image_name":"file2","image_path":"1461468362622.jpg"},</p>
  </blockquote>
  
  <pre><code> class ViewController:    UIViewController,UITableViewDelegate,UITableViewDataSource {
  
  var arrDict :NSMutableArray = NSMutableArray()
  
  override func viewDidLoad() {
  
      super.viewDidLoad()
  
       jsonParsingFromURL()
  
  }
  
  func jsonParsingFromURL () {
       let url = NSURL(string: "http://clipbyte.com/ontest/cron/webapi.php?task=webapi.getAllClips")
  
       let request = NSURLRequest(URL: url!)
  
       NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue()) {(response, data, error) in
          self.startParsing(data!)
      }
  }
  
  func startParsing(data :NSData)
  {
      let dict: NSDictionary!=(try! NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers)) as! NSDictionary
      for var i = 0 ; i &lt; (dict.valueForKey("task") as! NSArray).count ; i++
      {
          arrDict.addObject((dict.valueForKey("task") as! NSArray) .objectAtIndex(i))
      }
  
      NSLog("array is ", arrDict)
  }
  
  
  func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int
  {
      return 1
  }
  func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int
  {
      return arrDict.count
  }
  
  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell
  {
  
      let cell : UITableViewCell! = tableView.dequeueReusableCellWithIdentifier("Cell")
  
      let strTitle : NSString=arrDict[indexPath.row] .valueForKey("clip_name") as! NSString
  
      cell.textLabel!.text=strTitle as String
      cell.imageView?.image = arrDict[indexPath.row].valueForKey("clip_image_path") as? UIImage
      return cell
  
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  
  
  }
  </code></pre>
  
  <p>if i use the below class for custom cell it gives me error at init function below IBOutlet </p>
  
  <p>TableViewCell class       </p>
  
  <pre><code>class TableViewCell: UITableViewCell
   {
  @IBOutlet weak var lblTitle: UILabel!
  @IBOutlet weak var lbDetails: UILabel!
  
  init(style: UITableViewCellStyle, reuseIdentifier: String) {
  super.init(style: style, reuseIdentifier: reuseIdentifier)
  // Initialization code
  }
   override func awakeFromNib() {
   super.awakeFromNib()
  
  // Initialization code
  }
  
   override func setSelected(selected: Bool, animated: Bool) {
   super.setSelected(selected, animated: animated)
   // Configure the view for the selected state
  }
  }
  </code></pre>