I am trying to push an Object with values to an Array but I always get null is not an object in the console. But when I console.log the object it is filled and not null so why can't I push it into the array?
let obj: Lektion;
obj = {
LektionID: data2.string[0],
Date: data2.string[1],
StudentID: data2.string[2],
Name: data2.string[3],
Status: (data2.string[4] !== '0'),
TeacherID: data2.string[5]
};
console.log(obj);
this.Lektionen.push(obj);