Below I have a constant dict that is of NSMutableArray type that stores my data extracted from JSON. I've tested that I'm able to extract what I need when referring to variable name.
While I know that appending a normal array would be myArrayValue.append("String"), however I tried the same method with my 2D array it doesn't work.
I'm quite new to Swift2 programming, please do explain in detail. Thanks in advance!
let dict: NSMutableArray!=(try! NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers)) as! NSMutableArray
var arrayObject : [AnyObject]
var arrayName : [[String]] = [[]]
var name : String
for var x=0; x<dict.count; x++ {
arrayObject = dict[x].allValues
for var y=0; y<5; y++ {
name = arrayObject[y].description as String
arrayName[x][y].append(name)
}
}