call api using alomafier request get data inside a response but below request it get blank how to get it : I call this function i get json response from alomafier request but when i call global variable and stored data variable get result inside a response loop but print variable below response loop it get blank or nil.     

  I use array of Dictionary but not get solution plz help me.

  Alamofire.request(url,method: .post).responseJSON { response in
  var data1 = response.result.value ---- I get response here but  not get result outside of the loop






please give me answer below my code 















**Code :**



     override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cellIdentifier = "Cell"
        let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) as! CustomTableViewCell_view
       
        var domain:[[String:String]] = []
        
        
        var asyncObj:Operations = Operations()
        var url:String = asyncObj.getUrl("ticket", operation: "get_domain", filter: "")
        Alamofire.request(url,method: .post).responseJSON { response in
            
            var data1 = response.result.value
            //let data1 = response.data
            
            if(data1 != nil)
            {
                var json1 = JSON(data1!)
                GlobalVar.myvar = 10
                let count: Int? = json1.array?.count
                var departmentList = [DEPARTMENT]()
                for index in 0 ..< count! {
                    var domainid = json1[index]["domain_id"]
                    var domainname = json1[index]["domain_name"].stringValue
                    self.numbers.append(count!)
                    cell.nameLabel.text = "- "+domainname
                    
                    var url:String = asyncObj.getUrl("ticket", operation: "get_department", filter: "vis_filter=avis_domain.domain_id=\(domainid)")
                    Alamofire.request(url,method: .post).responseJSON { response in
                        
                        var data2 = response.result.value
                        var departmentList:[[String:String]] = []
                        if data2 != nil {
                            var json2 = JSON(data2!)
                            var count2: Int? = json2.array?.count
                            for index2 in 0 ..< count2!{
                                var departmentid = json2[index2]["department_id"]
                                var departmentname = json2[index2]["department_name"]
                                //departmentList.append(["departmentid": "\(departmentid)", "departmentname": "\(departmentname)"])
                                cell.addressLabel.text = "- "+"\(departmentname)";
                                var url:String = asyncObj.getUrl("ticket", operation: "get_department_status_list", filter: "vis_department=\(departmentid)")
                                Alamofire.request(url,method: .post).responseJSON { response in
                                    
                                    var data3 = response.result.value
                                    
                                    if data3 != nil {
                                        var json3 = JSON(data3!)
                                        var statusList:[[String:String]] = []
                                        var count3: Int? = json3.array?.count
                                        for index3 in 0 ..< count3!{
                                            var statusid = json3[index3]["status_id"]
                                            var statusname = json3[index3]["status_name"]
                                            cell.status.text = "- "+"\(statusname)";
                                            var url:String = asyncObj.getUrl("ticket", operation: "get_tickets", filter: "vis_filter=status_id=\(statusid)&\(VIS_PREFIX)ticket.department_id=\(departmentid)")
                                            Alamofire.request(url,method: .post).responseJSON { response in
                                                
                                                var data4 = response.result.value
                                                
                                                var tcount: Int?
                                                var ticketcount:Int = 0
                                                if data4 != nil {
                                                    var json4 = JSON(data4!)
                                                    tcount = json4.array?.count
                                                    for index3 in 0 ..< tcount! {
                                                        ticketcount = ticketcount + 1
                                                    }
                                                }
                                                
                                                
                                            }
                                        }
                                       
                                    }
                                }
                                
                            }
                            
                            
                            
                           
                        }
                    }
                }
              
            }
        }
        
        
        print("json value\(GlobalVar.myvar)")
        /*let hotelName = hotelNames[(indexPath as NSIndexPath).row]
        cell.nameLabel.text = hotelName
        cell.addressLabel.text = hotels[hotelName]
        */
        return cell
    }