Hi I have a map like this :
[this:0, is:1, a:2, file:3, anotherkey:4, aa:5]
I wish I could find the key\'s given the value>
key
value>
You could invert the map, like this:
Map m = [a: '1', b: '2'] Map mInvert = m.collectEntries { e -> [(e.value): e.key] } assert mInvert == ['1':'a', '2':'b'] assert mInvert['2'] == 'b' assert m['b'] == '2'