let responseJSON = try? JSONSerialization.jsonObject(with: data, options: [.allowFragments])
if let responseJSON = responseJSON as? [String:Any] {
if let tJsonObj = xResponse["d"] as? [[String:Any]] {
// not working here...
}
}
La variable tJsonObj n'obtient pas mon contenu de tableau json. Mon JSON ressemble à ceci:Swift - Le tableau Parse de l'objet JSON imbriqué ne fonctionne pas
{"d": "[{\"title\":\"xxx\",\"timestamp\":\"2017-10-16 23:53:40\"},{\"title\":\"Mein Test iPhone 7\",\"timestamp\":\"2017-10-17 18:16:24\"}]"}
J'espère que quelqu'un peut aider - merci!
Jetez un oeil à: https://stackoverflow.com/questions/41734982/parsing-nested-array-of-dictionaries-using-object-mapper/41735194#41735194 –