I'm trying to convert JSON to a table, but it doesn't. Everything seems fine, but I cannot see the values in my table.
My code that converts JSON to table:
$(function() {
var my_data = '';
$.each(JSON.parse(sonuc.response) , function(key, item){
my_data += '
';my_data += '
'+item.kod+'';my_data += '
'+item.ev + " - " + item.deplasman+'';my_data += '
'+item.oran+'';my_data += '
'+item.tahmin+'';my_data += '
'+item.tur+'';my_data += '
'+item.tarih+'';my_data += '
'+item.tarih+'';my_data += '
';});
console.log(my_data)
$('#maclar_table').append(my_data);
});
my_data output:
213Galatasaray - Fenerbahçe3.2MS2free22.03.2019 / 18:0022.03.2019 / 18:00213Galatasaray - Fenerbahçe3.2MS2free22.03.2019 / 18:0022.03.2019 / 18:00213Galatasaray - Fenerbahçe3.2MS2free22.03.2019 / 18:0022.03.2019 / 18:00213Galatasaray - Fenerbahçe3.2MS2free22.03.2019 / 18:0022.03.2019 / 18:00213Galatasaray - Fenerbahçe3.2MS2free22.03.2019 / 18:0022.03.2019 / 18:00my JSON Output:
My Table HTML Code:
Kod
Takımlar
Oran
Tahmin
Tür
Tarih
Yetkiler