Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.
/ JsonToHtmlTable Public archive

Make json more readable as html table

License

Notifications You must be signed in to change notification settings

cho0o0/JsonToHtmlTable

Repository files navigation

JsonToHtmlTable

Current npm version Dependency free Code coverage Known Vulnerabilities Code quality

This is a dead simple Javascript library for converting json to HTML table.

Features

  • Visualize nested json
  • Support json in string format
  • Callback support

How to use it

Import

import jsonToHtmlTable.min.js in a html script tag

<script src="jsonToHtmlTable.min.js"></script>

or download via npm

npm install jsontohtmltable

or add via yarn

yarn add jsontohtmltable

Usage

<table id="test-table"></table>
<script>
  var json = { name: 'Alex', age: 16 };
  var callbackFunc = function() {
    console.log('This is generated by a callback function');
  };
  JsonToHtmlTable(document.getElementById('test-table'), json, callbackFunc);
</script>

See sample.html for more details.

About

Make json more readable as html table

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •