Reputation: 13
I am able to populate a hash map using groovy. How can I now get the corresponding value against a key from that hash map? Please note, I have to pass the key in a variable while doing the lookup.
Upvotes: 0
Views: 110
Reputation: 171184
You mean like:
def map = [tim: 'yates']
def key = 'tim'
println map[key]
?
Upvotes: 1