How to insert table row if and only if first cell value of a row is not equals to first cell value of next row?
<pre><code>             &lt;table&gt;
                &lt;tr&gt;
                   &lt;td&gt;aaa&lt;/td&gt;
                   &lt;td&gt;111&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                   &lt;td&gt;aaa&lt;/td&gt;
                   &lt;td&gt;222&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                   &lt;td&gt;bbb&lt;/td&gt;
                   &lt;td&gt;111&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                   &lt;td&gt;bbb&lt;/td&gt;
                   &lt;td&gt;222&lt;/td&gt;
                &lt;/tr&gt;
             &lt;/table&gt;
</code></pre>

<p>In this example second row first cell value 'aaa' and third row first cell value 'bbb' are not same. Now How to add a new table row between second row and third row.</p>
