append json values to a global array using Alamofire and SwiftyJson

Ask A Question

Login To post a question
var imgURLArray = [String]()

override func viewDidLoad() {
    // Do any additional setup after loading the view, typically from a nib.
    myTableView.delegate = self
    myTableView.dataSource = self

    `enter code here`// Alamofire
        Alamofire.request("").responseJSON { (response) in
            if let value = response.result.value {

                let json = JSON(value)

                for i in 1...9 {
                    if let imageURL = json["data"][i]["images"]["standard_resolution"]["url"].string {

                    } else {print("no way")}



when i print imgURLArray it is empty
i tried dispatchQueue and still not working
i tried passing it to tableview and reload it and still not working

For more info please click here

Have a question or need a custom quote?