I am trying to parse JSON using Codable in swift 4. My concern is
public class entStatusAndDescription : NSObject {
var status : Int?
var statusDescription : String?
var records : AnyObject?
}
I want the above entity to be codable but the "records" cant be specific entity, as this is my base entity that I will receive from API. After I parse the status and statusDescription, only then I can specify which entity will records be
e.g I am calling API for customer details and i receive status as 200 i.e success then I will parse records to Customer entity