Lets say, I am fetching the data from excel and I need to map two things.
ID and the corresponding Dates, Excel data look like this :-
ID Dates
N1#N1 2018-10-09,2018-10-10#2018-10-11
Actual output should look like this :-
{N1=2018-10-09,2018-10-10} {N1=2018-10-11}
I have tried below code:-
//Fetching from using in soap ui
String id = context.expand('${Data#ID}')
String dt = context.expand('${Data#Dates}')
List arrId = id.split('#')
def strD
LinkedHashMap < String, String > dateMap= new LinkedHashMap <
String, String > ()
for(int i=0; i<arrId.size(); i++) {
strD = dt.split("#").asType(List)[i]
dateMap.put(arrId[i],strD)
}
log.info dateMap
Could anyone help me on this?