Data Display in one line in DataTable

Hi Guys,

In my html, I have the following codes:
html

I we’re able to collect the data and then loop within the collection. Then try to display the data using the following:
$.getJSON(url, function (result) {
console.log(result);
$.each(result, function (i, field) {
var year = field.applicableYear;
var month = field.applicableMonth;
var weight = field.weight_kg;
varhtml
});

But the result is one liner only. Need your guidance.output

Do you know the difference between <th> and <td>?

1 Like

Header th and Standard td. I tried both of them but I still have the same result.

Use <td> instead of <th> and remove that second “=” in the last class, and see what you get

HTML
sav01

JS
sav02

Result
sav03

The way I see it. The data is display only in the first row and in “Year” column only.

$$('#biometriclogs').append($$(html));

1 Like

thank you @tsalira for correcting me on my errors.

@plpl thanks a lot. attached is the result of your guidance. it just overwrite my header. i think can able to progress with this result.
sav04

1 Like