You can use an index in a range and then access the array via its index:
<ul>
<li v-for="index in 10" :key="index">
{{ shoppingItems[index].name }} - {{ shoppingItems[index].price }}
</li>
</ul>
Note that this is 1-indexed: in the first iteration, index
is 1, and in the second iteration, index
is 2, and so forth.
You can also check the Official Documentation for more information.