2
My file is coming in this format, but I would like it not to appear this #id information before sale:
{
"$id": "1", //como não mostra isso?
"venda": [
{
"$id": "2",
"poule": 73,
"idusuario": 4,
"vendedor": "ITAMAR SOUZA",
"total": 50.00,
"datajogo": "2016-01-19T00:00:00",
"terminal": "(11)985590116",
"empresa": "SANTIAGO - LOJA 01",
"nsu": 73
}
]
}
Code that is generating Json:
[HttpGet]
[Route("consulta/ListarUltimoJogosRalizado/{idusuario}")]
public HttpResponseMessage ListarTodosJogosAtivos(int idusuario)
{
try
{
var tTabela = new JogoAplicacao();
var listar = tTabela.ListarPoId(idusuario);
return Request.CreateResponse( HttpStatusCode.OK, new { venda = listar.ToArray() } );
}
catch (Exception ex)
{
return Request.CreateResponse(HttpStatusCode.BadRequest, ex.Message);
}
}
Do you want to remove that in Javascript? you can do
delete obj.$id
, but it would be better to do it on the server– Sergio