I encountered an error on the following line of code: value: v2.this.listvalue
this.listvalue = 'something';
list.forEach((v: any) => {
v.data.forEach((v2: any) => {
this.searchlist.push({
header: v.header,
value: v2.this.listvalue
});
I am trying to access the v2 attribute which is stored in the listvalue variable. How can I address this error that says "Cannot read property 'listvalue' of undefined" showing up in the console log?