title: Vue, accessing data that's in a different v-for loop
body: <p>I have a table body in my Vue application where I've got one section of rows being built by a loop around a data object. I then have a separated section that is using a different data object, however, I need to compare a value from it to a value from the other loop in order to get conditional styling</p>
  <p>I'm wondering if there is a way where I can send data from the <code>value</code> portion of the first for loop into a method call at the time of that v-for so that I can access it in the summary loop, if that makes sense</p>
  <p>Here's the table:</p>
  <pre><code>  &lt;tbody v-if=&quot;selected === 'Stores'&quot;&gt;
    &lt;tr v-for=&quot;(value, manager) in managerNumbers&quot; :key=&quot;manager&quot;&gt; &lt;!--Here is where I'm wondering if I can send value to a method call--&gt;
      &lt;td v-for=&quot;date in dates&quot; :key=&quot;date&quot; &gt;
        &lt;div v-for=&quot;(dataForDate, dateVal) in value.dates&quot; :key=&quot;dateVal&quot;&gt;
          &lt;div v-if=&quot;dateVal == date &quot;&gt;
            @{{dataForDate.total_categories}}
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  
    &lt;tr&gt;&lt;td colspan=&quot;10&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td colspan=&quot;10&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;
      &lt;th&gt;
        Summary
      &lt;/th&gt;
      &lt;div v-for=&quot;store in activeStore&quot; :key=&quot;store&quot;&gt;
        &lt;th :style=&quot;'background: ' + (value.qty &gt; store.qty ? '#000' : '#fff')&quot;&gt;@{{ store.stock_num }}&lt;/th&gt;
      &lt;/div&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
  </code></pre>