Skip to content

Instantly share code, notes, and snippets.

@bhachauk
Created June 15, 2019 12:03
Show Gist options
  • Save bhachauk/58acb5425c13fa04c0dd35f2a9a23db3 to your computer and use it in GitHub Desktop.
Save bhachauk/58acb5425c13fa04c0dd35f2a9a23db3 to your computer and use it in GitHub Desktop.
Using Map in Better Way
groovy -e 'a=["a": ["b",1], "c": ["d",2]]; println a.collectEntries{k,v -> ["$k":v[0]]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment