tristanhimmelman / AlamofireObjectMapper

An Alamofire extension which converts JSON response data into swift objects using ObjectMapper
MIT License
2.66k stars 474 forks source link

Dynamically select Model #275

Open mash3l777 opened 5 years ago

mash3l777 commented 5 years ago
func UpdateDataOf(tableName: String ) {
        CleanTable(Table: "\(tableName)CoreData")
        print("Update \(tableName) Data...")
        let URL = "https://***********/api/master/\(tableName)"

        var tableResponse = "\(tableName)Response"

        Alamofire.request(URL).responseObject { (response:DataResponse<tableResponse> ) in

            let wardResponse = response.result.value
            let result = wardResponse!.result!

The Issues in tableResponse I don't now the correct type