I have a delimited string and The delimiter is "$%". The fields are in an specific order. For example: John$%Smith$%30$%Los Angeles I need to get the values of this string and store them in the respective property
Customer.firstName(_)
Customer.lastName(_)
Customer.age(_)
Customer.city(_)
So far I have tried this but I know I am doing it incorrectly:
if(thisString != null){
if(thisString.endsWith("$%")){
Customer.firstName(thisString.substring(0,indexOf("$%");
}
}