[Vuejs]-Passing an array object property from Laravel in Vue

0👍

for...in loops are for objects, but you have an array. Try a for...of loop:

for (let tag of this.editDataTags) {
   console.log(tag.name)
}

or forEach:

this.editDataTags.forEach(tag => {
   console.log(tag.name);
});

or for loop:

for (let i=0; i < this.editDataTags.length; i++) {
   console.log(this.editDataTags[i].name)
}

Leave a comment