Data:
[
{ firstName: \"Foo\", lastName: \"Bar\" },
{ firstName: \"John\", lastName: \"Doe\" }
]
How can I have this kind of structu
Which version of Xcode have you got? Your code should work fine but the line:
var persons:Array = [Dictionary()]
create the array with first empty dictionary, try this instead:
var persons:Array = [Dictionary]()
var dic1 = ["Name" : "Jon"]
var dic2 = ["Surname" : "Smith"]
persons.append(dic1)
persons.append(dic2)
println(persons)