json-to-markdown
v1.0.4
Published
Transform JSON object to markdown style table
Downloads
1,980
Readme
json-to-markdown-table
Transform JSON object to markdown style table
Example
var app = require('json-to-markdown');
var columns = [
'a',
'b',
'c'
];
var object = [
{
a: 'asdfa',
b: [['239487','asdff'],['239487','asdff']],
c: {c: 'asdf',g: ['239487','asdff']},
},{
d: 'efg',
e: [],
f: 'klm'
},
{
a: 'sdf',
b: 'gsdf',
c: null
}
];
var tableMdString = app(object, columns);
// |a|b|c|
// |----|----|----|
// |asdfa|[ [ 239487, asdff ], [ 239487, asdff ] ]|{"c":"asdf","g":"[ 239487, asdff ]"}|
// |sdf|gsdf|{null}|