Data:
[ { firstName: \"Foo\", lastName: \"Bar\" }, { firstName: \"John\", lastName: \"Doe\" } ]
How can I have this kind of structu
something like this can work for you:
var persons: Array> = Array()
and now you can add the names:
persons.append(["firstName": "Foo", "lastName": "Bar"]); persons.append(["firstName": "John", "lastName": "Doo"]);
NOTE: if you are insecure how to use literals, just don't use them.