Swift - Get an array of strings from JSON using SwiftyJSON
<pre><code>[
  {
    "content": "Hello!",
    "images": [
      {
        "url": "http://url1.com"
      },
      {
        "url": "http://url2.com"
      },
      {
        "url": "http://url3.com"
      }
    ]
  }
]
</code></pre>

<p>How can I get an array of image urls using <code>SwiftyJSON</code>?</p>

<p>This is what I tried and did not work. </p>

<pre><code>for (key, subJson) in json["images"] {
 if let url = subJson["url"].string {
    print(url)
}
}
</code></pre>

<p>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?</p>