directive: v-for to loop through an object
by edith_tang
HTML
<div id="app">
<li v-for="(value, key, index) in author">
{{ index + 1 }} - {{ key }} : {{ value }}
</li>
</div>
JavaScript
var app = new Vue({
el: '#app',
data: {
author: {
name: 'Gabriel García Márquez',
birth: '1927',
price: 'Nobel Prize'
}
}
})