title: How to avoid duplicate string in a jquery table
body: <p>How to avoid duplicate string in a jquery table sample output is <a href="https://i.stack.imgur.com/1WtdS.jpg" rel="nofollow noreferrer">here</a> I am looking to consolidate the questions in a one column. The expected table(ouput) look like <a href="https://i.stack.imgur.com/XRa3P.jpg" rel="nofollow noreferrer">this</a></p>
  <pre><code>var list=[
  {q:'Question1',r:'response1',credit:4},
  {q:'Question2',r:'response2',credit:9},
  {q:'Question2',r:'response3',credit:3},
  {q:'Question3',r:'response4',credit:8},
  {q:'Question3',r:'response5',credit:9},
  {q:'Question3',r:'response6',credit:3},
  {q:'Question4',r:'response7',credit:7},
  {q:'Question4',r:'response8',credit:9},
  {q:'Question4',r:'response9',credit:3},
  {q:'Question4',r:'response10',credit:1},
  {q:'Question5',r:'response11',credit:5},
  {q:'Question5',r:'response12',credit:3}
  ];
   
  
  $.each(result, function (key,qstn) {
                          html += '&lt;tr&gt;';  
                          html += '&lt;td&gt;' + qstn.q+ '&lt;/td&gt;'; 
                          html += '&lt;td&gt;' + qstn.response+ '&lt;/td&gt;';
                          html += '&lt;/tr&gt;';  
                          });
                  });
                      $('.tbody').append(html);
  </code></pre>