Parser for HTML to JSON
npm install html-tables-to-json
A simple and easy to use parser for HTML table to JSON
``sh`
$ npm install html-tables-to-json
`ts
import { CheerioTableParser } from "html-tables-to-json"
const tableParser = new CheerioTableParser()
const result = tableParser.parse(
| header 1 | header 2 | |
|---|---|---|
| cell 1 | cell 2 | cell 3 |
| cell 4 | ||
)console.log(result[0])
// => output
// [
// ["header 1", "header 2"],
// ["cell 1", "cell 2", "cell 3"],
// ["cell 4", "cell 4"],
// ]
``