title: Vue nested v-for, get index of parent
body: <p>I have a nested <code>v-for</code>, basically, I want to get the index of the parent <code>v-for</code> and use it inside the child <code>v-for</code></p>
  
  <pre><code>&lt;template v-for="(branch, index) in $store.state.agency.branch_users.users"&gt;
      &lt;table  class="table" id="agency-contact-table" &gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th aria-colindex="1" class=""&gt;#&lt;/th&gt;
                  &lt;th aria-colindex="1" class=""&gt;Name&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              &lt;tr v-if="branch.role_users" v-for="(branch_users, index) in branch.role_users"&gt;
                  &lt;td&gt;{{$parent.$index}}&lt;/td&gt;
                  &lt;td&gt;{{branch_users.user.first_name}} {{branch_users.user.last_name}}&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>I tried using <code>$parent.$index</code> but it still doesn't work. It doesn't show any errors but no data also.
  What should I do to get the <code>index</code> in my parent v-for?</p>