I'm really struggling with this issue. I've tried a few different things but nothing seems to work. Any suggestions on how to tackle this problem?
Here's a link to a screenshot of the error I'm encountering...
<div class="container">
<div class="panel panel-default">
<div class="panel-heading clearfix">
<h4 class="panel-title pull-left" style="padding-top: px;">Counts</h4>
<form method="POST" action="">
<button type="submit" class="btn btn-default btn-sm pull-right" name="reset"><span class="glyphicon glyphicon-refresh"></span></button>
</form>
</div>
<table class="table">
<thead>
<div> <tr>
<th>Count</th>
<th>Item</th>
</tr>
</div>
<tbody>
<div id="JSON_output" class="row">
</div>
</tbody>
<script type="text/javascript">
jQuery.ajax({
type: "GET",
url: "json.php",
dataType: "json",
success: function(response){
$.each(response, function(key, value){
var html = '' + '<tr><td><ul>'+value.count+'</ul></th>'+
'<td><ul><ul><ul>'+value.item+'</ul></ul></ul></td></tr>'+
'';
$("#JSON_output").append(html);
});
}
});
</script>
</thead>
</table>
</div>
</div>