title: Extracting text from page td element with Cheerio
body: <p>This Meteor server code uses Cheerio/jQuery to get the value "44 years" from the sixth <code>td</code> element in a web page which contains the following html;<br>
  It gives undefined, Any idea how to do it? Thanks </p>
  
  
  
  <pre class="lang-html prettyprint-override"><code>&lt;tr&gt;
    &lt;td class="label" style="white-space:nowrap"&gt;Nmae:&lt;/td&gt;
    &lt;td&gt;&amp;nbsp;&lt;/td&gt;
    &lt;td colspan="2" class="bodyText"&gt;male&lt;/td&gt;
    &lt;td colspan="2" class="label"&gt;Age:&lt;/td&gt;
    &lt;td class="bodyText" width="1%"&gt;&amp;nbsp;&lt;/td&gt;
    &lt;td colspan="2" class="bodyText"&gt;44 years&lt;/td&gt;  &lt;--------------
  &lt;/tr&gt;
  </code></pre>
  
  
  
  <pre class="lang-js prettyprint-override"><code>$('td[class=label]').each((i, elem) =&gt; { //&lt;------ $ is cheerio object
    let str = elem.innerHTML;
    console.log(str);    //&lt;---------- undefined
    if (str === '44 years') {
      console.log('found it');
      let age = elem.nextSibling.nextSibling.innerHTML;
      console.log(age);
      return false;
    }
  });
  </code></pre>