The function work till the first debugging point and then finishes, it does not execute or loop? What Am I doing wrong here, any help is appreciated?
methods: {
changeData(data) {
this.data = data;
this.data_to_show = this.data.data;
this.source = this.data.source;
this.database = this.data.database;
// eslint-disable-next-line
this.all_data = Object.values(this.data_to_show)[0];
debugger;
for (let i = 0; i < this.all_data.length; i += 1) {
if (i % 2 === 0) {
this.even_data_to_show.push({ i: this.all_data[i] });
} else {
this.odd_data_to_show.push({ i: this.all_data[i] });
}
}
debugger;
},
},
Object.values(this.data_to_show)[0]returns an array?this.all_data.length.