If you have a list of objects it is easier, so you can browse the list and associate the values of each respective object with the html injection you want to do. Incidentally, you can do html injection without any framework.
An example of an object list:
{
listaObj : [
{
nome : "Testador",
idade : 25,
sexo : "M"
},{
nome : "Testadora",
idade : 22,
sexo : "F"
}
]
}
In this way you scroll through the list looking at objects more dynamically only using their attributes and you can do the html injection. Here's an example using the list of objects above.
var divCentral = document.getElementById("central");
for(var i = 0; i < listaObj.length; i++){
var divNome = document.createElement("div")
divNome.innerHTML = listaObj[i].nome
divCentral.appendChild(divNome)
}
In this way the size of the list of your objects is indifferent, the code will always work.
:)