Groovy web console

subscribe to the feed Subscribe
to this
site

Print map keys and values

Published 2 years ago by Valentin
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def mymap = [un:1, dos:2, tres:3]

mymap.each { k, x ->
    println "Key $k - Value $x"
}