How to append ajax return data to a table
You could do:

ajax.callback=function(data){
    var elements = ["ID", "test", "year", "code", "Label", "contents", "test"];

    for (var i=0; i&lt;dataObj[0].data.length; i++){
        var td;
        var tr=document.createElement('tr');

        for (var j=0; j &lt; elements.length; ++j){
            td = document.createElement('td');
            td.innerHTML=dataObj[0].data[i][elements[j]];
            tr.appendChild(td);
        }

        $('#Table').append(tr);
    }
}