I did some changes to an specific part of a json, an array to be more specific, to finish I want to save the changes in the json, but I can't because xcode give me this error:
"Cannot assign value of type '[JSON]' to type 'JSON'"
This is a sample of the code:
let originalSessionJson = dataObject!.sessionJson
var json:[JSON] = originalSessionJson["activity"].arrayValue
for i in 0 ..< json.count{
.
.
.
}
dataObject?.sessionJson["activity"] = json
Thanks for the help.
Perhaps you mean this:
dataObject?.sessionJson["activity"].arrayObject = json