1👍
✅
I would recommend changing your object structure to be a bit more intuitive.
I’m not familiar with how vue tracks that incoming data object, but here’s a rough idea:
if (currentVal === obj[currentKey]) {
currentVal = 1;
currentKey += 1;
} else {
currentVal += 1;
}
0👍
if (this.currentVal === this.obj[this.currentKey]) {
this.currentKey += 1;
this.currentVal = 1;
} else {
this.currentVal += 1;
}
copy this code to your stepForward method
Source:stackexchange.com