In vuejs you can do list rendering in the template like
<td v-for="item in items"></td>......
But can you iterate over that same data array property like....
for(var i = 0; i < this.items.length; i++)
this.$data.items[i]
this post is quite old, but this can be useful to anyone who wants to iterate into an array of object.
Instead of:
for(var i =0; i < this.items.length; i++) {
console.log(this.items[i]);
}
You can do this a little bit more concisely and more readable (in my opinion):
this.items.forEach((item) => {
console.log(item);
})
itemsis an array, of course, you can iterate over it, butthis.$data.items[i]should bethis.items[i].