banderson623 banderson623 - 4 months ago 18
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()