[Vuejs]-How do i get the index of an object array

0👍

What I understood is you want to fetch the index of item from the array, hope this help

form.items.forEach((item, index) => {
 console.log('item', item)
 console.log('index', index) // index of item
})

1👍

Your question is not clear.But my understanding i will post two type of answer:-

1) Get all the values from items array

   form.items.map((item)=> console.log(item));

2) Get Particuler index value:

   const findIndex = 0;
   form.items[findIndex];

Leave a comment