_lauren11
5 years agoOccasional Contributor
how to use map in groovy
i get response fron jdbc in the form of list 1: [name., type, color, size, occassion]
and another response in the form of list 2: [saree, long, black, 5 inch, party]
now i want to combine list 1 and list 2 in the form of key value pair. such as [name: saree, type: long, color:black, size: 5 inch, occassion:party]
also, elements in list 1 and list 2 can vary. Sometimes, there can be more elements and sometimes less, depending upon the data in database.
How to make dynamic groovy to achieve this .
thanks in advance
HimanshuTayal sir.