If I have a list of objects acquired from a database
[{ "id":0 ,"name":"John", "lastname":"Shell" },{ "id":1,...];
which results in (dynatable plugin):
data : JSON.stringify(data)
success: function(data,status){
$('#table').dynatable({
dataset:{
records:data
}
})
}
but I don't want to show the id on 'th' when generating a table in the html, instead I want to rename it to securityNumber without changing the actual JSON
<table id="tabela">
<thead>
<th>id</th>
<th>name<th>
<th>last_name<th>
</thead>
</table>
I can't just replace id because the plugin identifies the columns name through the attribute of the JSON Object
I've tryed different plugins, i'm using dynatable (already searched at the documentation) but I am open to another solution.
How do I proceed ?