I'm having a bit of trouble trying to get my json data response shown in a two column table. I've found lots of posts that show how to show it as a single row, but nothing as a two column table.
This is what I have so far and it is still only showing a single column with multiple rows:
var trHTML = '';
$.each(data.Titles, function (i, item) {
var v = 0;
trHTML += '<tr>';
if(v <= 2){
trHTML += '<td><a href="' + data.Links[i] + '">' + data.Titles[i] + '</a><br><img src="' + data.Images[i] + '"></td>';
}
else{
var v = 0;
trHTML += '</tr>';
trHTML += '<tr>';
}
trHTML += '</tr>';
v++
});
$('#location').append(trHTML);
},
var v = 0;out of$.each(...)v === 0all the time