title: Scraping the nth element of a table using cheerio?
body: <p>i want to scrape the wind column of this table <a href="https://www.bmreports.com/bmrs/?q=generation%2Ffueltype&amp;fbclid=IwAR2p2a84CaJhgzF-YOU4MzOS-cMuZUpeDmLHFkWZU7-NauRHrA1owwdsMog" rel="nofollow noreferrer">https://www.bmreports.com/bmrs/?q=generation%2Ffueltype&amp;fbclid=IwAR2p2a84CaJhgzF-YOU4MzOS-cMuZUpeDmLHFkWZU7-NauRHrA1owwdsMog</a>
  i can scrape the whole table, but i don't know how to sort it. Ideally i would just scrape the one column.</p>
  <pre><code>const request = require('request');
  const cheerio = require('cheerio');
  
  request('https://www.bmreports.com/bmrs/?q=generation%2Ffueltype&amp;fbclid=IwAR2p2a84CaJhgzF-YOU4MzOS-cMuZUpeDmLHFkWZU7-NauRHrA1owwdsMog', (error, response, html) =&gt;
  {
      if (!error &amp;&amp; response.statusCode == 200)
      {
          const $ = cheerio.load(html);
  
          const table = $('.gen-fuel');
          var newArray = [];
          var windArray = [];
         // console.log(table.html());
          $('td').each((i, el) =&gt;
          {
              const item = $(el).html();
  
              newArray.push(item);
              console.log(item)
  
          });
          const every7thValue = (arr, nth) =&gt; arr.filter((e, i) =&gt; i % nth === nth - 1);
          console.log(every7thValue(newArray, 7));
          //console.log(newArray);
  
  
  
      }
  });
  </code></pre>