Skip to content
Advertisement

Populate using v-for loop in VueJS

I am new to VueJS and I just figure out how to populate Select Options box using v-for loop.

JavaScript

Here is the list I have.

JavaScript

This is our desired output.

JavaScript

Advertisement

Answer

Luckily for you, Vue can loop through the properties in an Object as described in v-for with an Object.

I’ve also included a snippet below which should help you achieve what you want.

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement