ios - Swift Cannot append to subscript on type JSON -


i'm getting json data using swiftyjson, , got changeable array using:

let worlddatagenjson = json(data:data) worlddatagenblocks = worlddatagenjson["blocks"]["x"].arrayvalue array 

with this, can append worlddatagenblocks like:

worlddatagenblocks.append([     "y": [:] ]) 

i created new array inside worlddatagenblocks called "y", i'm not able append it

worlddatagenblocks[0]["y"][0].append([     "bid": 0,     "id": 0,     "fid": 0 ]) 

it say:

value of type 'json' has no member 'append'

i tried set way too, no avail:

worlddatagenblocks[cx]["y"][cy] = [     "bid": 0,     "id": 0,     "fid": 0 ] 

every time print "worlddatagenblocks" show empty "y" arrays.

please help.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -