Groovy web console

subscribe to the feed Subscribe
to this
site

Print map keys and values

Published 6 months ago by Valentin
Actions  ➤ 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"
}