Groovy web console

subscribe to the feed Subscribe
to this
site

Lookup via Variable

Published 1 month ago by SP with tags beginner
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def QUANTITY = "Qty"
def lookup = [(QUANTITY):2]
println lookup."Qty"
println lookup[(QUANTITY)]
println lookup."${QUANTITY}"