[Vuejs]-How to retrieve data from an Object in an Array in Vue.js

0👍

This could not work. You set the leaf property multiple times which is not supported. I assume you would do something like:

var myvar = {stick: [
  {leaf: {name: "Vincent"}}, 
  {leaf: {name: "Charles"}},
  ...
]};

console.log(myvar.stick[0].leaf.name);

0👍

You’d want tree[0].stick.leaf.name with the data you have.

Leave a comment