[Vuejs]-How to loop through nested data with VueJS

3👍

You are iterating filters.items which is an array that holds one object that has multiple properties. Instead, iterate that one object.

So write this instead:

       <li v-for="item in filters.items[0]" :key="item.id">
           <Checkbox v-bind:data.sync="item" />
         </li>

This way you are actually iterating the object properties and not the array.

Leave a comment