Node.js parse HTML table and get result as JSON
<p>I found cheerio library to parse HTML nodes and get children of table and create JSON format, but I can't use correctly that and my code could not get nods.</p>

<h3>HTML</h3>

<pre><code>&lt;table class="Modules" width="180" cellspacing="0" cellpadding="0" border="0"&gt;
    &lt;tbody&gt;
    &lt;tr&gt;
        &lt;th align="center" style="padding:2px 5px;" colspan="6"&gt;
            &lt;span id="ctl00_ucBody_ucContent_ctl00_rptItemList_ctl00_lblTitle"
                  style="font-family: Arial, Tahoma, Helvetica, sans-serif; font-weight: bold; font-size : 1.1em; float:right;"&gt;نرخ ارز&lt;/span&gt;
&lt;span dir="ltr"&gt;
&lt;span id="ctl00_ucBody_ucContent_ctl00_rptItemList_ctl00_lblDate"
      style="font-family: Arial, Tahoma, Helvetica, sans-serif; font-weight: bold; font-size : 1.1em;"&gt;۱۳۹۵/۰۵/۲۸&lt;/span&gt;
&lt;/span&gt;
        &lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr class="ExRate-TR"&gt;
        &lt;td&gt;USD&lt;/td&gt;
        &lt;td nowrap=""&gt;Dollar&lt;/td&gt;
        &lt;td&gt;12345&lt;/td&gt;
        &lt;td&gt;
            &lt;img width="9" height="9" title="" alt="down" src="/Images/down.gif"&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input id="ctl00_ucBody_ucContent_ctl00_rptItemList_ctl01_imgChart" /&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;a id="ctl00_ucBody_ucContent_ctl00_rptItemList_ctl01_hypRSS" href="../ExRatesRSS.aspx?cid=1" alternatetext="RSS"&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="ExRate-TR"&gt;
        &lt;td&gt;CHF&lt;/td&gt;
        &lt;td nowrap=""&gt;Danmark&lt;/td&gt;
        &lt;td&gt;78456&lt;/td&gt;
        &lt;td&gt;
            &lt;img width="9" height="9" title="" alt="down" src="/Images/down.gif"&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input id="ctl00_ucBody_ucContent_ctl00_rptItemList_ctl01_imgChart" /&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;a id="ctl00_ucBody_ucContent_ctl00_rptItemList_ctl01_hypRSS" href="../ExRatesRSS.aspx?cid=1" alternatetext="RSS"&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>

<p>In this HTML I'm trying to get <code>USD</code>, <code>1234</code> nodes on first row until finish table, for example in that my code must get <code>USD</code>, <code>1234</code> and <code>CHF</code>, <code>78456</code>.</p>

<pre><code>request(url, function (error, response, html) {
    if (!error) {
        var $ = cheerio.load(html);
        var title, release, rating;
        var json = {currency: "", amount: ""};
        $('.Modules').filter(function () {
            var data = $(this);
            log.info(data);
            currency   = data.children().first().text();
            amount = data.children().next().next().children().text();
            json.currency   = currency;
            json.amount = amount;
            log.info(JSON.stringify(json));
        });
    }
});
</code></pre>

<p>I don't get any result on this line of code:</p>

<pre><code>log.info(data);
</code></pre>