[Vuejs]-Listing Elements of JSON Array with v-for

0👍

Added .data to this.peoples

.then(response => {
 console.log(JSON.stringify(response.data))
 this.peoples = response.data.data
 })

change peoples:” to peoples:[]

export default {
data(){
    return{
        peoples: [],
        errors: ''
    }
},

And finally:

      <li v-for="people in peoples">
      {{people.username}}
      {{people.firstnames}}
      </li>
👤Tom

0👍

Is correct:

<div id="table">
<li v-for="people in peoples">
 {{people.username}}
 {{people.firstnames}}
</li>
</div>

Leave a comment