I have one array of dictionary and I am trying to do is get first object from array and append in my secondArray. Dictionary is [String: AnyObject] and array is of String. Here is my code in didSelectRowAtIndexPath:
let myDictionary: [String: AnyObject] = dataArray[indexPath.row] as! [String : AnyObject]
selectedArray.append(myDictionary)
But I am getting error :
Cannot convert value of type '[String : AnyObject]' to expected argument type 'String'.
How can I add dictionary in array?
selectedArray? Try to declare it as:-var selectedArray : NSMutableArray = NSMutableArray()