title: How to get this HTML table's text box value using JS?
body: <p>I've tried different approaches, but I'm missing something crucial:</p>
  <p>Here's a <a href="https://jsfiddle.net/santosonit/wpkog0z4/14/#&amp;togetherjs=kiKDnBLMz1" rel="nofollow noreferrer">Fiddle</a> version</p>
  <pre><code>function saveData() {
    var table = document.getElementById(&quot;dtable&quot;);
  
    var [, ...tr] = table.querySelectorAll(&quot;tr&quot;);
    var tableData = [...tr].map(r =&gt; {
      var td = r.querySelectorAll(&quot;td&quot;);
      return [...td].map((c, j) =&gt; j &lt; 6 ? c.innerHTML : j == 6 ? c.querySelectorAll(&quot;select&quot;)[0].value : j == 7 ? c.querySelectorAll('comments')[0].value);
    })
    tableData = tableData.filter(e =&gt; e[6] != 'empty');
  
  }
  </code></pre>
  <p>Note for column counting purpose: The first column of the table is hidden.</p>
  <p>This is the column whose data is to be grabbed:</p>
  <pre><code>&lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;comments&quot; style=&quot;width:99%;&quot;&gt;&lt;/td&gt;
  </code></pre>
  <p>Appreciate your help!</p>