I need to access the name
field in an array of objects that I am sending to my Vue component like this:
<article-form
:edit-data-tags="{{ $article->tags }}"
></article-form>
The array looks like this:
[ 0: { id:'1', name:'mytag' } ... ]
Once inside my component, I want to extract the name value so that I can store it and pass it along. How should I go about doing this?
The solution provided in this post seems promising, but when I attempt to implement it like so:
created: function () {
for (let tag in this.editDataTags) {
console.log(tag.name)
}
}
I only get an undefined result.