title: Finding or changing items on same table row based on a column value or values
body: <p>I struggled with this for a long, long time so hopefully this will help someone.</p>
  
  <p>The problem was this:</p>
  
  <ul>
  <li>I needed to find a row by matching one or more specific cell values</li>
  <li>Then change the value of one or more cells in that same row.</li>
  <li>Compounding the problem was that the value within these cells may be nested by multiple and varying number of DIV's (and potentially other HTML tags).</li>
  </ul>
  
  <p>Below is a bit of contrived HTML but hopefully illustrate the point:</p>
  
  <pre><code>&lt;table&gt;
      &lt;th&gt;Select&lt;/th&gt;
      &lt;th&gt;First Name&lt;/th&gt;
      &lt;th&gt;Middle Name&lt;/th&gt;
      &lt;th&gt;Family Name&lt;/th&gt;
      &lt;th&gt;Comment&lt;/th&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;input type="checkbox" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;John&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;span&gt;Smith&lt;/span&gt;&lt;/td&gt;
              &lt;td&gt;&lt;span&gt;Nice guy.&lt;/span&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;input type="checkbox" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;John&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;span&gt;Doe&lt;/span&gt;&lt;/td&gt;
              &lt;td&gt;&lt;span&gt;Jolly decent cricketer.&lt;/span&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;input type="checkbox" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Jane&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;span&gt;Doe&lt;/span&gt;&lt;/td&gt;
              &lt;td&gt;&lt;span&gt;Great swimmmer.&lt;/span&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;input type="checkbox" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;span&gt;Jack&lt;/span&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;span&gt;Sprat&lt;/span&gt;&lt;/td&gt;
              &lt;td&gt;&lt;span&gt;Spiffing golfer.&lt;/span&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>The question is is there a more or less generic way of getting to the checkbox of John Doe, for example?</p>