I'm not sure how to explain correctly in a title, but here is the situation:
Having three available angles: front, left and right:
captures: {
front: { img: '', correct: false },
left: { img: '', correct: false },
right: { img: '', correct: false }
},
I have defined a default variable named this.currentAngle = 'front'
.
I want to access a value from CAPTURES object list within currentAngle.
This does not work:
this.captures.[this.currentAngle].img
nor this one, logically
this.captures.this.currentAngle.img
What's the correct approach ?