[Vuejs]-Vue 2: v-for dynamic props in component

2👍

Your data listaSelezionati is an Array of Arrays of Objects: [[{one:one}],[{two,two}]]

when you go this:

<div class="row" v-for="(selezionato,index) in listaSelezionati">
     <div>{{selezionato[index]}}</div>
</div>  

You are telling Vue to render the first item [{one:one}] and then the index in that item {one:one}. However, since they all appears to be arrays with length 1, you could do this:

<div class="row" v-for="(selezionato,index) in listaSelezionati">
     <div>{{selezionato[0]}}</div>
</div>  

Leave a comment