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

**URL:** <https://forum.inductiveautomation.com/t/perspective-dynamically-address-nth-array-element-of-component-property-via-expression/40432>\
**Category:** Ignition\
**Tags:** perspective, ignition80\
**Created:** [November 9, 2020, 3:40am UTC](https://forum.inductiveautomation.com/t/perspective-dynamically-address-nth-array-element-of-component-property-via-expression/40432 "2020-11-09T03:40:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 9, 2020, 3:40am UTC](https://forum.inductiveautomation.com/t/perspective-dynamically-address-nth-array-element-of-component-property-via-expression/40432/1 "2020-11-09T03:40:11Z")

</div>

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.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/2/a22b3b98213b7eb9a237146b16ab770f8a9b2ee0.png)

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]`

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 9, 2020, 3:43am UTC](https://forum.inductiveautomation.com/t/perspective-dynamically-address-nth-array-element-of-component-property-via-expression/40432/2 "2020-11-09T03:43:33Z")

</div>

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