Hi i am using ObjectMapper for my Json mapping and i have a model class named People which has one property personName and i am doing the mapping like this
class People : Mappable,BaseMappable{
var personName : String?
required init(map:Map){ }
func mapping(map: Map){
personName <- map["name"]
}
}
but my problem is that i am reusing this model for more then one websservice
and personName
might come for different keys. In my current example i am mapping personName
using name key but in my other webservice
response personName
should get initialised using userName
key so how do i manage one variable managing for multiple keys?