I'm facing a JSON parsing issue I've no idea how to fix.
I need this part of the JSON data
"columns": {
"created_at": "DESC",
"id": "DESC"
}
to be stored in a [String: String]?
optional dictionary. So, this is the code I'm using:
self.columns = json["columns"].dictionary?.map {
(key, value) -> (String, String) in
return (key, value.stringValue)
}
This however produces a compiler error:
'inout JSON' is not convertible to 'JSON'
I should probably add that this is part of a pretty large piece of JSON data, and this is the only one causing issues.
Any clues would be most appreciated, I'm kind of stuck on this one.
Michael, I parse JSON with routine, cannot help but think it is a little more simplistic than yours, but it works :) filesQ.enqueue is an array in essence it adds the fields I want to.
Please send me back a copy if you managed to improve it!