Perspective: Dynamically address 'nth' array element of component property via expression

I have a component with an array property which contains objects/json, and I’m trying to dynamically address the array to pull out the data from one array element based on the user selection.
I want to update the selectedTanks property with the values based on the selected index.


If index == 0 above, then selectedTank.tankNumberAStart should equal 4198 and similarly for B.

I’ve tried:

  • {view.custom.tanks}[0]
  • {view.custom.tanks}[0,0]

I’ve just found the property(...) expression function which does what i’m looking for.
property('view.custom.tanks[' + {view.custom.selectedTank.index} + '].TankNumberAStart')