Getting child element (toggle switch) [JAVA]

I want to verify the toggle switch whether its ON or OFF but all toggle switch have same value.

I tried to use [@instance = ‘0’] but it does not work

Get the value of the “checked” attribute.