Install globally with npm
$ npm i -g mdtable2json
Takes a markdown string and extracts tables in json form contained in it.
var x =
`
| a | b | c |
| ---- | ----- | ----- |
| 1 | 2 | 3 |
`
var tb = require('mdtable2json').getTables(x)
/* tb =
[{
"headers": [
"a",
"b",
"c"
],
"json": [{
"a": "1",
"b": "2",
"c": "3"
}]
}]
*/
- Vittorio Zaccaria
Copyright © 2015 Vittorio Zaccaria Released under the BSD license.
This file was generated by verb-cli on September 29, 2015.