ios - Appending to a Multidimensional Array? -


i'm switching swift. while building app found myself following issue; can't figure out better way this, far works know if proper way or not, if how can better?

let's have following empty array:

 var users:[[string:string]] = [] 

after there code , got important part.

        if resultset != nil{             while resultset.next(){                  var single_user = [                     "userid": resultset.stringforcolumn(userid) string,                     "username": resultset.stringforcolumn(firstname) string,                     "userlastname": resultset.stringforcolumn(lastname) string,                     "userlastupdate": resultset.stringforcolumn(lastupdate) string                  ]                 users.append(single_user)              }         } 

from there right values:

enter image description here

but said, right way it?


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -