0

私は2つのリストを持っています:

 def courseList  = PublicTraining.executeQuery(
     "SELECT t.course.id, t.course.name from PublicTraining AS t")
 def cityList  = PublicTraining.executeQuery(
     "SELECT t.venue.city.id, t.venue.city.name from PublicTraining AS t")

と:

courseList  = [[1, weblogic], [2, ajax]]
cityList   = [[1, City1], [2, City2]]

このようなを作成するにはどうすればよいMapですか?

resultMap = ['Course':[['1', 'weblogic'],['2', 'ajax']], 'City':[['1','City1'],
    ['2','City2']] ]
4

0 に答える 0