I have some parameters which I get from request.getParameterMap()
and I would like to iterate through the Map and take the nth value from each row in the Map. Below is an example of the data
Map contains:
recordNo:1,2,3,4,5,6
dob:19800101,19800201,'',19930101,19940101,19950302
addressLn1: well street, prince street,lewis street,edward street,mills street, #3 rich street
What i have is a Map that contains this data i would like to loop through the data and take nth record from the Map array. This is what i want
first iteration print: 1,19800101,well street
second iteration print: 2,19800201,prince street
Code:
Map map = request.getParameterMap();
for(int i = 0; i< map.size();i++){
//how can i access the values with the array at the nth position
System.out.println("Value at " +i+ " " +map.get(i).toString());
}