lightswitch05 / table-to-json

Serializes HTML tables into JSON objects.
http://lightswitch05.github.io/table-to-json/
MIT License
756 stars 172 forks source link

Is it possible to extract all tables in HTML string? #46

Closed LucasSeveryn closed 6 years ago

LucasSeveryn commented 6 years ago

I am used to the node.js "table-as-JSON" package, it lets me extract all tables that are in HTML string. This is very useful for parsing, and tables that have no ids. Is this functionality part of the table to json package?

example:

// Convert an HTML blob into an array of all the tables on the page
var tabletojson = require('tabletojson');
var tablesAsJson = tabletojson.convert(html);
var firstTableAsJson = tablesAsJson[0];
var secondTableAsJson = tablesAsJson[1];

link: https://www.npmjs.com/package/tableasjson

lightswitch05 commented 6 years ago

No, you must use this tool per table