Skip to content

Instantly share code, notes, and snippets.

@ivanarrizabalaga
Last active December 25, 2015 02:08
Show Gist options
  • Save ivanarrizabalaga/6899893 to your computer and use it in GitHub Desktop.
Save ivanarrizabalaga/6899893 to your computer and use it in GitHub Desktop.
Groovy basic dynamic access to property via GString
Map data=[
one:"john",
two:"mary"
]
String entry="two"
println data."${entry}" //"mary"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment