<div v-for="(value, name, index) in object">
{{ index }}. {{ name }}: {{ value }}
</div>
// object: {
// title: 'How to do lists in Vue',
// author: 'Jane Doe',
// publishedAt: '2016-04-10'
// }
<div v-for="(value, name, index) in object">
{{ index }}. {{ name }}: {{ value }}
</div>
<ul id="v-for-object" class="demo">
<li v-for="value in object">
{{ value }}
</li>
</ul>
new Vue({
el: '#v-for-object',
data: {
object: {
title: 'How to do lists in Vue',
author: 'Jane Doe',
publishedAt: '2016-04-10'
}
}
})