title: javascript putting multiple distinct id into array
body: <p>I have a table </p>
  
  <pre><code>&lt;table id='mytable'&gt;
  &lt;tr&gt;
    &lt;th&gt; Cars &lt;/th&gt;
    &lt;th&gt; Food &lt;/th&gt;
    &lt;th&gt; clothes&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt; 1 &lt;/td&gt;
    &lt;td&gt; yes &lt;/td&gt;
    &lt;td&gt; jeans &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt; 1 &lt;/td&gt;
    &lt;td&gt; yes &lt;/td&gt;
    &lt;td&gt; jeans &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt; 84 &lt;/td&gt;
    &lt;td&gt; no &lt;/td&gt;
    &lt;td&gt; shirt &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt; 4984 &lt;/td&gt;
    &lt;td&gt; yes &lt;/td&gt;
    &lt;td&gt; hat &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>I have a javascript function that takes the first td and get the value, but it only takes the first value in this case 1. I want to take all of the first columns distinct values and store it in an array. so the end result should be </p>
  
  <pre><code>$firstColumnArray = [1,84, 4984]
  </code></pre>
  
  <p>My function looks like </p>
  
  <pre><code>$(document).ready(function()
  {
  $one = document.getElementById("table");
  $two = $(this).find("td").eq(0).text()
  alert($two);
  });
  </code></pre>
  
  <p>How can i loop though the entire contents of the tables first row and store it in a variable?</p>