convert any json to table
npm install json-table-converterJSON To Table
========
A JavaScript library to convert JSON data to Table.
- Convert JSON To <table />
``bash`
npm install json-table-converter
| Param | Type | Description |
| --- | --- | --- |
| json | Object \| Array | |
| options | Object | |
| [options.tableStyle] | String | <table/> Style |
| [options.trStyle] | String | <tr/> Style |
| [options.thStyle] | String | <th/> Style |
| [options.tdStyle] | String | <td/> Style |
| [options.tdKeyStyle] | String | <td/> Key Style |
| [options.formatCell] | Function | Cell Value Format Function |

js
const { jsonToTableHtmlString } = require('json-table-converter')
const html = jsonToTableHtmlString(json, {
tableStyle: string, //
Style
trStyle: string, // Style
thStyle: string, // Style
tdStyle: string, // Style
tdKeyStyle: string, // Key Style
formatCell: (cellValue, isKeyCell) => newCellValue,
})
``If you find this project useful, you can buy us a cup of coffee:
