title: JQuery update table cell and add new table rows
body: <p>A newbie question,really.</p>
  
  <p>Suppose I have a html table like this:</p>
  
  <pre><code>&lt;div id="div1"&gt;
             &lt;table id="table1" border="1"&gt;
               &lt;tr&gt;
                   &lt;th bgcolor="#eee"&gt;&lt;strong&gt;ID&lt;/strong&gt;&lt;/th&gt;
                   &lt;th bgcolor="#eee"&gt;&lt;strong&gt;Price&lt;/strong&gt;&lt;/th&gt;
              &lt;/tr&gt;
               &lt;tr&gt;
                  &lt;td id='id1'&gt;1111&lt;/td&gt;
                  &lt;td id='id2'&gt;2222&lt;/td&gt;
               &lt;/tr&gt;
  
           &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Now I am using Jquery to get data in json format from server, like this:</p>
  
  <pre><code>id1,19.99
  id2,29.99
  id3,39.00
  </code></pre>
  
  <p>What I want to achieve is: Look at the data, if the id already exist in table, update the cell value. If id doesn't exist in the table, add a new row. How do I do that in JQuery? I just started to learn JQuery. Now I can use ajax call to get the data, but don't know how to update the table. Any help is appreciated. </p>