each time i call this api <https://foodish-api.herokuapp.com/api/> i get an image. I don't want one image, i need 11 of them, so i made the loop to get 11 images.
But what i can't do is reloading the collection view once the loop is finish.

```
func loadImages() {

    DispatchQueue.main.async {
                for _ in 1...11{
                       let url = URL(string: "https://foodish-api.herokuapp.com/api/")!
                       let task = URLSession.shared.dataTask(with: url) {(data, response, error) in
                           guard let data = data else { return }
                           do {
                               let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String : String]
                               print(json!["image"]!)
                               self.namesOfimages.append(json!["image"]!)

                           } catch {
                               print("JSON error: \(error.localizedDescription)")
                           }
                           }.resume()
        }
    }
    self.collectionV.reloadData()
    print("after resume")
}

```