banderson623 banderson623 - 9 months ago 49
Groovy Question

How to check if element in groovy array/hash/collection/list?

How do I figure out if an array contains an element?
I thought there might be something like

which would evaluate as


.contains() is the best method for lists, but for maps you will need to use .containsKey() or .containsValue()