I'm trying to put content of a JSON in the HTML table but content is filled in the rows ,and I would like to be filled in the columns.
My JSON :
var serie=
{
"keywords":[["CELL","CELL2","CELL3"]]
}
My JQuery code:
$.each(serie.keywords, function () {
$.each(this, function (k,v) {
var eachrow = "<tr>"
+ "<td>" + v + "</td>"
+ "</tr>";
$('#tbody').append(eachrow);
});
});
As result I have soething like this:
CELL
-----
CELL2
-----
CELL3
And I would like that it will be like that:
CELL|CELL2|CELL3
Thanks for your help!!!