A library to convert JSON files into interactive HTML grids (tables)
npm install @araujoigor/json-gridJSON Grid is a open source javascript library meant to be run in the browser that aims to allow users to convert JSON objects into user-friendly and interactive tables/grids.
In order to install, just require the package through unpkg (https://unpkg.com/@araujoigor/json-grid) and use the JSONGrid object to generate your grid.
A simple usage case would be:
1. Include the lib from unpkg
2. Create a div with id container
3. Store your JSON into a variable.
4. Create a JSONGrid instance with the references to your data and the container (see the API section)
5. Run the render method of the instance.
``html
API
The functions that are meant to be used publicily are:
$3
> The constructor receives two arguments:
data and container.The
data parameter is expected to be JSON object.
The container paramenter is expected to be a DOM node and will be used to render the contents.After the object is created, you can use the
render function to render the grid.$3
Used to render grid based on the given
data to the given container.$3
Returns the grid DOM without rendering it to the
container`.