title: html scraping for td element using cheerio js and node js
body: <p>I have many html files with the below structure. I need to get the values 'GET' and '<a href="http://localhost:5601/app/sense" rel="nofollow">http://localhost:5601/app/sense</a>' from the below. but they are not exact same values in the all the documents, it be post, put or delete. but the html structure is same.</p>
  
  <pre><code>&lt;colgroup&gt;
        &lt;col class="col-lg-1"&gt;
        &lt;col class="col-lg-7"&gt;
     &lt;/colgroup&gt;
     &lt;tbody&gt;
        &lt;tr&gt;
           &lt;td&gt;
              &lt;code&gt;Method&lt;/code&gt;
           &lt;/td&gt;
           &lt;td&gt;GET&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
           &lt;td&gt;
              &lt;code&gt;URL Path &amp;amp; Params&lt;/code&gt;
           &lt;/td&gt;
           &lt;td&gt;http://localhost:5601/app/sense&lt;/td&gt;
        &lt;/tr&gt;
     &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Any suggestion on how to do this with cheerio ? I am trying to parse through the HTML table searching for the method and URL values in td element but I no luck. </p>
  
  <pre><code>glob(__dirname + "/../docs/*/*/*/*/*/*.html", function (er, files) {
      for (var i = 0; i &lt; files.length; i++) {
  
          fs.readFile(files[i], (err, data) =&gt; {
              if (err) throw err;
              $ = cheerio.load(data);
              $('tr').each(function () {
                  console.log($('td').val());
              });
          });
  
      }
  });
  </code></pre>