title: Get the data of a table using of two columns only JavaScript
body: <p>I am new to the <code>webDevelopment</code>.I have searched a lot but I did not get the solution. Here I have a table like -</p>
  
  <pre><code>A             B      C      D
  FullName     ABC    pqr     xyz
  TelephoneNo  123    RST     GHI
  </code></pre>
  
  <p>Here I want to have the data of the table of a specific columns like </p>
  
  <pre><code>A and B
  </code></pre>
  
  <p>So, the data should be like -  </p>
  
  <pre><code>FullName: ABC
  </code></pre>
  
  <p>I want to have the data of rows present in the column A and column B </p>
  
  <p>Html - </p>
  
  <pre><code>&lt;table class="table table-striped table-bordered report-table" id="tableid" contextmenu-container="meta.contextmenu" fixed-header&gt;
              &lt;thead class="text-center text-info"&gt;
                &lt;th class="text-center"&gt;Annotation&lt;/th&gt;
                &lt;th class="text-center"&gt;Field&lt;/th&gt;
                &lt;th class="text-center"&gt;Message&lt;/th&gt;
                &lt;th class="text-center"&gt;Score&lt;/th&gt;
              &lt;/thead&gt;
              &lt;tr ng-repeat="report in reports.data"&gt;
                &lt;td class="text-center"&gt;{{ report.attributes.annotation }}&lt;/td&gt;
                &lt;td class="td-report-field" contentEditable contextmenu-item="report" context-menu="menuOptions"&gt;{{ report.attributes.field }}&lt;/td&gt;
                &lt;td&gt;
                  &lt;input type="checkbox" ng-if="report.attributes.message &amp;&amp; showcheckbox" ng-bind="report.attributes.message" ng-click="getcheckedData(report.attributes.message)"&gt;
                  &lt;span ng-if="report.attributes.message" contentEditable ng-model="report.attributes.message"&gt;
                        {{ report.attributes.message }}
                      &lt;/span&gt;
                  &lt;span ng-if="!report.attributes.message"&gt;{{ report.attributes.message }}&lt;/span&gt;
                &lt;/td&gt;
                &lt;td class="text-center"&gt;{{ report.attributes.score }}&lt;/td&gt;
              &lt;/tr&gt;
            &lt;/table&gt;
  </code></pre>
  
  <p>what I tries --</p>
  
  <pre><code>var oTable = document.getElementById('tableid');
                      //gets rows of table
                      var rowLength = oTable.rows.length;
  
                      //loops through rows    
                      for (i = 0; i &lt; rowLength; i++){
  
                      //gets cells of current row  
                      var oCells = oTable.rows.item(i).cells;
  
                      //gets amount of cells of current row
                      var cellLength = oCells.length;
  
                      //loops through each cell in current row
                      for(var j = 0; j &lt; cellLength; j++){
                              var cellVal = oCells.item(j).innerHTML;
                              alert(cellVal);
                          }
                      }
  </code></pre>