title: Access index in v-for when iterating over object
body: <p>I am trying to access the index of an iteration in <a href="http://vuejs.org/" rel="nofollow noreferrer">Vue</a>'s <code>v-for</code> binding.</p>
  
  <p>This is the object:</p>
  
  <pre><code>const obj = {  
    obj1: {  
      some: 'data'
    },
    obj2: {  
      some: 'data'
    },
    obj3: {  
      some: 'data'
    }
  }
  </code></pre>
  
  <p>and I'm looping over it:</p>
  
  <pre><code>&lt;li v-for="(object, index) in obj" :key="index"&gt;{{ object.some }}&lt;/li&gt;
  </code></pre>
  
  <p>The problem is that contrary to looping over an <code>array</code> the <code>index</code> variable in case of looping over an <code>object</code> like this does not hold the iteration index (e.g. <code>0</code>, <code>1</code>, <code>2</code>) but actually holds the object name <code>obj1</code>, <code>obj2</code>, <code>obj3</code>.</p>
  
  <p>Why is it behaving like that and how can I get my precious iteration index back in this case?</p>