如何将json转换为表格?

我正在尝试将JSON转换成一个表,但没成功。一切看起来都很好,但我看不到表中的值。我用于将JSON转换为表的代码:

    $(function() {
          var my_data = '';
          $.each(JSON.parse(sonuc.response) , function(key, item){
          my_data += '<tr>';
          my_data += '<td>'+item.kod+'</td>';
          my_data += '<td>'+item.ev + " - " + item.deplasman+'</td>';
          my_data += '<td>'+item.oran+'</td>';
          my_data += '<td>'+item.tahmin+'</td>';
          my_data += '<td>'+item.tur+'</td>';
          my_data += '<td>'+item.tarih+'</td>';
          my_data += '<td>'+item.tarih+'</td>';
          my_data += '</tr>';
          });
         console.log(my_data)
         $('#maclar_table').append(my_data);    
  });

my_data output:

<tr><td>213</td><td>Galatasaray - Fenerbahçe</td><td>3.2</td><td>MS2</td><td>free</td><td>22.03.2019 / 18:00</td><td>22.03.2019 / 18:00</td></tr><tr><td>213</td><td>Galatasaray - Fenerbahçe</td><td>3.2</td><td>MS2</td><td>free</td><td>22.03.2019 / 18:00</td><td>22.03.2019 / 18:00</td></tr><tr><td>213</td><td>Galatasaray - Fenerbahçe</td><td>3.2</td><td>MS2</td><td>free</td><td>22.03.2019 / 18:00</td><td>22.03.2019 / 18:00</td></tr><tr><td>213</td><td>Galatasaray - Fenerbahçe</td><td>3.2</td><td>MS2</td><td>free</td><td>22.03.2019 / 18:00</td><td>22.03.2019 / 18:00</td></tr><tr><td>213</td><td>Galatasaray - Fenerbahçe</td><td>3.2</td><td>MS2</td><td>free</td><td>22.03.2019 / 18:00</td><td>22.03.2019 / 18:00</td></tr>

JSON Output:https://i.stack.imgur.com/tN7hQ.png

表格HTML代码:

         <table class="table" name="maclar_table">
                <thead class=" text-primary">
                  <th>
                    Kod
                  </th>
                  <th>
                    Takımlar
                  </th>
                  <th>
                    Oran
                  </th>
                  <th>
                    Tahmin              
                  </th>
                  <th>
                    Tür
                  </th>
                   <th>
                    Tarih
                  </th>

                  <th>
                    Yetkiler
                  </th>
                </thead>
              </table>

You are setting the name to maclar_table, not the id. $("#maclar_table") in jQuery gets elements with the ID of maclar_table, not the name. My suggestion for the code on line 1 of your table:

<table class="table" name="maclar_table" id="maclar_table">

That should do the job.