I'm doing some queries in the database and must return through the Json, but I can not hit the fomato. I'm doing the following:
var dataResult = new List<List<Object>>();
I query the database and and add below
dataResult.Add(new List<object>(new object[] { "rRod:" + rod, "rKmI:" + vlrkmI, "rKmF:" + vlrkmF, "rExt:" + ext, "rSol:" + sol }));
To assemble the table use
function (data) {
$("#divResult").empty();
//Adicionar a tabela na div
table = "<fieldset style='height:50px '><legend>Resultado da Matriz</legend><table id='tableResult'><tr><th>Rod</th>";
table += "<th>kmI</th><th>kmF</th><th>Ext</th><th>Sol</th></fieldset>"
$("#divResult").append(table);
$(eval(data)).each(function (data) {
$("#tableResult").append(
"<tr><td>" + this.rRod+ "</td>" +
"<td>" + this.rKmI + "</td>" +
"<td>" + this.rKmF + "</td>"
"<td>" + this.rExt + "</td>" +
"<td>" + this.rSol + "</td></tr>");
});
But not this genrando the table with values.