Get item's groups

Hello. I want to get groups of triggering items
rule “test”
when Member of gwindow changed to OPEN
var item = triggeringItem
var itemName = item.state
logInfo(“Events”, "item "+item)
logInfo(“Events”, "itemName "+itemName)
I get [clipse.smarthome.model.script.Events] - item window1_playroom (Type=ContactItem, State=OPEN, Label=Статус окна, Category=window, Groups=[ginflux, gwindow, gplayroom]) 2020-10-20 17:26:56.091 [INFO ] [clipse.smarthome.model.script.Events] - itemName OPEN
if itry itemName = item.groups
have error Rule 'test': 'groups' is not a member of 'org.eclipse.smarthome.core.items.Item'; line 38, column 20, length 11


Don’t forget groups for an Item will be a list

Thank you)

How can I get value from list?