title: Search through multiple columns of a table
body: <p>I currently have a table that filters and searches through one column of each table, however I'm not sure how to edit my function so that the search is applied to all columns of a table. 
  This is my function and one of my tables: </p>
  
  <pre><code>  function myFunction(){
    var td, i;
    var input = document.getElementById("myInput");
    var filter = input.value.toUpperCase();
    var table = document.getElementById("myTable");
    var tr = table.getElementsByTagName("tr");
  
    // Loop through all table rows, and hide those who don't match the search query
    for (i = 0; i &lt; tr.length; i++) {
      td = tr[i].getElementsByTagName("td")[0];
      if (td) {
        if (td.innerHTML.toUpperCase().indexOf(filter) &gt; -1 ) {
          tr[i].style.display = "";
        } else {
          tr[i].style.display = "none";
        }
      }
    }
  }
  
  &lt;table className="table table-bordered" id="table2a"&gt;
            &lt;tbody&gt;
            &lt;tr&gt;&lt;th&gt; Consumer System: &lt;/th&gt;
            &lt;td&gt;System1 &lt;/td&gt;
            &lt;td&gt;System2 &lt;/td&gt;
            &lt;/tr&gt;
  
            &lt;tr&gt;
            &lt;th&gt;Consumer Dev App Name: &lt;/th&gt;
            &lt;td&gt; To be on-boarded &lt;/td&gt;
            &lt;td&gt; To be on-boarded &lt;/td&gt;
            &lt;/tr&gt;
  
            &lt;tr&gt;
            &lt;th&gt; Contact Email Distribution &lt;/th&gt;
            &lt;td&gt;TBD &lt;/td&gt;
            &lt;td&gt; TBD &lt;/td&gt;
            &lt;/tr&gt;
            &lt;/tbody&gt;
            &lt;/table&gt;
  </code></pre>