Groovy web console

subscribe to the feed Subscribe
to this
site

[:].putAll works

Published 1 month ago by moa ankor with tags clone map
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
Map initialParams = ['test': 1, 'tes2': 2]
Map mapCopy = [:].putAll(initialParams.entrySet())
initialParams.put('tes2', 99)

println(mapCopy)