You can use swift Dictionary
[String: AnyObject]
this way instead of NSMutableDictionary
.
var data = [[String: AnuObject]]()
for i in 0..<questionArr.count {
data.append(["QuestionID": questionArr[i], "AnswerID": answerArr[i]])
}
let dic = [
"QuizId" : "23566656",
"StartTime" : "23:30",
"EndTime" : "23:45",
"data" : data
]
print(dic)
20
solved how to make Dyanamic NSDictonary in Swift