RintoAndrews
7/27/2019 - 4:37 PM

userDifferntCodingKeys.swift

struct UserInfo: Codable{
    var userId: String
    var jobTitleName: String
    var userfirstName: String
    var userlastName: String
    var preferredFullName: String
    var employeeCode: String
    var region: String
    var phoneNumber: String
    var emailAddress: String
    var salary: Double
    
    enum CodingKeys: String, CodingKey {
        case userId
        case jobTitleName
        case userfirstName = "firstName"
        case userlastName = "lastName"
        case preferredFullName
        case employeeCode
        case region
        case phoneNumber
        case emailAddress
        case salary
    }
}