🪛 In Progress: Can't get list index in code

I have a list with the list index in each view model. When the user clicks on an item, it sets a property for selected index. This works great in the rive file where I can change the state if the list index matches the selected index. However, I want to get the listIndex of a view model in the code. In Rive, it says that List Index is a number, but I get null when I try to get the number.

Cannot read properties of null (reading 'value')

When I try to get view the properties, it shows type of ‘none’

I tried to get the property by index, but the value returns undefined instead of the number.

Is there any way to get the list index with the view model property?