[
{
"content": "Hello!",
"images": [
{
"url": "http://url1.com"
},
{
"url": "http://url2.com"
},
{
"url": "http://url3.com"
}
]
}
]
How can I get an array of image urls using SwiftyJSON?
This is what I tried and did not work.
for (key, subJson) in json["images"] {
if let url = subJson["url"].string {
print(url)
}
}
If I understand correctly, my "images" JSON contains an array of dictionaries but my code is for an array of strings. What can i do to get an array of url strings?