for each loop in groovy
This one worked for me:
def list = [1,2,3,4]
for(item in list){
println item
}
Source: Wikia.
as simple as:
tmpHM.each{ key, value ->
doSomethingWithKeyAndValue key, value
}
This one worked for me:
def list = [1,2,3,4]
for(item in list){
println item
}
Source: Wikia.
as simple as:
tmpHM.each{ key, value ->
doSomethingWithKeyAndValue key, value
}