title: Table to JSON using node.js
body: <p>I am trying to convert a table to JSON, to search for data easily, the URL is: <a href="http://www.tppcrpg.net/rarity.html" rel="nofollow noreferrer">http://www.tppcrpg.net/rarity.html</a></p>
  
  <p>I found this package:
  <a href="https://www.npmjs.com/package/tabletojson" rel="nofollow noreferrer">https://www.npmjs.com/package/tabletojson</a></p>
  
  <p>I tried to use it like:</p>
  
  <pre><code>'use strict';
  
  const tabletojson = require('tabletojson');
  
          tabletojson.convertUrl(
              'http://www.tppcrpg.net/rarity.html',
              { useFirstRowForHeadings: true },
              function(tablesAsJson) {
                  console.log(tablesAsJson[1]);
              }
          );
  </code></pre>
  
  <p>However it returns undefined in the console, are there any alternative options or am I using the package wrong?</p>