I have a data stored in a json variable to list the categories and their subcategory if any. How can I write HTML code / HTML table in a json variable as I do for the data to display category name, description and so on in cells of a HTML table?
I want for example a table with 3 columns where I can write data (the key "text" of the json variable) in each of these columns. Even if writing the table for just one column would be useful to use a bootstrap data table to limit the entries per page.
var jsonVar = [{
text: "Name: {{ category.name }}",
icon: "fa fa-home fa-fw",
nodes: [{
text: "subcategory: {{ category.subcategory.name }}",
icon: "fa fa-tree fa-fw",
nodes: [{
icon: "fa fa-user fa-fw",
text: "Created By: {{ subactegory.createdBy}}"
}]
}]
}];
Thanks in advance for your comments.
Example: