Ver Mensaje Individual
  #5 (permalink)  
Antiguo 29/03/2011, 05:42
Dany_s
 
Fecha de Ingreso: diciembre-2009
Ubicación: Misiones
Mensajes: 867
Antigüedad: 14 años, 5 meses
Puntos: 65
Respuesta: Imprimir array de objetos json en div con jquery

fijate bien la doc hay varios ejemplos http://api.jquery.com/jQuery.getJSON/


debe ser
Código Javascript:
Ver original
  1. $.getJSON("ajax.php", function(json) {
  2.     for(var i in json){
  3.         alert(json[i].goalone)
  4.     }
  5. });

o
Código Javascript:
Ver original
  1. $.getJSON("ajax.php", function(json) {
  2.     $.each(json, function(){
  3.         alert( this.goalone );
  4.     });
  5. });