I have defined an object in TS like this:
reportObj : {
'report' : {
'pk' : '',
'uploaded' : '',
'sections' : {
'section1' : '',
'section2' : '',
'section3' : ''
}
}
};
I want to set the value of section1. How can I do this? I am trying:
this.reportObj.report.sections.section1 = data;
This fails and I get the error:
Uncaught (in promise): TypeError: Cannot read property 'report' of undefined
What am I doing wrong?
this.prefix.