I have an array that looks like this (the full list is here):
var verbMap = [
{
infinitive: "gehen",
thirdPres: "geht",
thirdPast: "ging",
aux: "ist",
pastPart: "gegangen",
english: "go"
},
{
infinitive: "gelingen",
thirdPres: "gelingt",
thirdPast: "gelang",
aux: "ist",
pastPart: "gelungen",
english: "succeed"
}
];
I am trying to run through each part and print it into a table. I can access one of the values if I target it specifically, but I need to be able to print all of the values into <td>s. Each part of the array would be a <tr> with the values inside as the <td> tags.
What would be the best way to do this, and is there a better way to set the data up and interact with it?
It shouldn’t be too hard to create the table using nested for loops
(the example uses jQuery to build the elements…but you obviously don’t have to):Edit
Removed the jQuery since it seemed to bother everybody (even though the control structures were the important part of the example):