2
Good afternoon, you guys, I have a question about json,
i have the following json :
{
"jsonrpc":"2.0",
"result":{
"nr":26,
"lista":[
{
"codigo":"2",
"nome":"Pratos Quentes"
},
{
"codigo":"3",
"nome":"Sobremesas"
},
{
"codigo":"4",
"nome":"Bebidas Nao Alcoolicas"
},
{
"codigo":"7",
"nome":"Cocktails"
},
{
"codigo":"10",
"nome":"Cafes"
},
{
"codigo":"11",
"nome":"Consummes"
},
{
"codigo":"12",
"nome":"Porções"
},
{
"codigo":"13",
"nome":"Chocolates"
}
]
},
"id":138827
}
and when trying to go through the list of products , only loads only the last product this is the code I’m using to go through:
<script type="text/javascript">
var caminho = "http://brunofejesus.pe.hu/categorias.json";
$.getJSON(caminho, function(data) {
for(i in data.result.lista){
$('#gridCategorias').html(data.result.lista[i].nome);
}
});
</script>
here a print :
thanks in advance for the help!
Thanks Douglas for the help ! it worked vlw
– Bruno Ferreira