I'm having a bit of a problem so i have an array with objects when i log it it displays everything fine but when i try the .length
function it returns 0
for some reason.
Here's my code:
async getTicketType(updatedTicketType) {
await this.getTicketTypes();
if (this.typeOptions) {
console.log('ik kom hier');
console.log(this.typeOptions);
console.log(this.typeOptions.length);
for (let i = 0; i < this.typeOptions.length; i++) {
console.log('ik kom hier');
if (this.typeOptions[i]["value"] === updatedTicketType) {
this.currentTypeOptions = this.typeOptions[i];
}
}
}
}
And here's a picture of the logs: