I have the following Array setup in my oninit:
this.tests = [{
status: 0,
testresults: [{
name: 'test',
id: 1
}]
}
]
;
this.tests.push([{
status: 1,
testresults: [{
name: 'test2',
id: 2
}]
}
]
}]);
This array works as expected. My goal is to push a queries results into the testresults array that is inside tests.
this.tests[0].testresults.push(this.qryresults);
this.tests[1].testresults.push(this.qryresults);
Index 0 works correctly, Index 1 gives back the following error:
"ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'push' of undefined
TypeError: Cannot read property 'push' of undefined"