Question · Vue.js course · Module 2: Template Syntax
v-for over Object Properties
How do you read both the value and the key of each object property in v-for?
Answer options
- v-for="(value, key) in object"
- v-for="key in object"
- You cannot iterate over objects
- v-for="object.entries()"
Show the answer
Correct answer:
- v-for="(value, key) in object"