Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tpatel/arraytotable.js

Convert a json array to a sortable html table.
https://github.com/tpatel/arraytotable.js

Last synced: about 2 months ago
JSON representation

Convert a json array to a sortable html table.

Awesome Lists containing this project

README

        

# ArrayToTable.js

Convert a json array to a sortable html table.

## Usage

Download the [script from GitHub](https://raw.github.com/tpatel/ArrayToTable.js/master/lib/arrayToTable.js).

Include the script in your html page.
```

```

Create an empty table that will contain the data.
```

```

Launch the rendering with the following lines.
```

var myArray = [{name:'Thibaut', age:22, randomNumber:0.314}, {name:'Joe', age:43, randomNumber:0.256}, {name:'Jane', age:27, randomNumber:0.1337}];
arrayToTable.setTable('tableID', myArray);

```

## License

MIT