json - Swift2.0 - Create tableView from an array of tuples -


i have array of tuples created json.

typealias tagandlocation = (tag: string, location: string)  var resulttuples = [tagandlocation]()  (_, subjson) in json {     let tag = subjson["tag"].string!     let location = subjson["location"].string!      let tagloc = (tag: tag, location: location)     resulttuples.append(tagloc) } 

then i'll use

func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell {      let cell = uitableviewcell(style: uitableviewcellstyle.default, reuseidentifier: "cellconcert")             //problem here. want indexpath.row position of array of tupple             cell.textlabel?.text = resulttuples.[indexpath.row][]              return cell          } 

basically want tableview have content of concerts.

any idea? thanks


Comments

Popular posts from this blog

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

javascript - Handling constructor related functions while testing with mocha and sinon -