#GridView
Generates table markup with JSON input. It also supports mapping JSON properties to custom table headers.
Markup
<div id="myTable"></div>
Javascript
var people = [
{
firstName: 'Breno',
lastName: 'Ferreira',
email: '[email protected]',
age: 23
},
{
firstName: 'Rodrigo',
lastName: 'Vidal',
email: '[email protected]',
age: 23
},
{
firstName: 'Rodrigo',
lastName: 'Andrade',
email: '[email protected]',
age: 23
}
];
var mapping = {
firstName: 'First Name',
lastName: 'Last Name',
email: 'Email',
age: 'Age'
};
$('#myTable').gridView({data:people,headerMappings:mapping});
For a more comprehensive sample, check samples in sample folder