I really want to take variables from array index to its own array index property. now here's my code so far, but it didn't work. Hopefully this would visuallize you to what I mean.
const CHARACTERS: Character[] = [
{ id: 1, name: 'hei', image: './c' + this.id + '/' + 'portrait.png'},
{ id: 2, name: 'ok', image: './c' + this.id + '/' + 'portrait.png'},
{ id: 3, name: 'whatever', image: './c' + this.id + '/' + 'portrait.png'}
]
I want the image property resulting value to
./c1/portrait.png
./c2/portrait.png
./c3/portrait.png
Something like that.