My project has an example of getJSON() here.

 

http://code.google.com/p/ajaxmmo/source/browse/trunk/src/static/default.js#105


 
> Date: Mon, 2 Mar 2009 03:12:34 -0800
> Subject: [jQuery] Re: $.getJSON
> From: seas...@gmail.com
> To: jquery-en@googlegroups.com
> 
> 
> Using console.log and firebug will show you what everything is.
> 
> console.log(data);
> $.each(data.records, function(i,item){
> console.log(i);
> console.log(item);
> console.log(this);
> });
> 
> On Mar 2, 1:54 am, Alain Roger <raf.n...@gmail.com> wrote:
> > On Mon, Mar 2, 2009 at 10:52 AM, Matt Quackenbush 
> > <quackfu...@gmail.com>wrote:
> >
> >
> >
> > > Yes.
> >
> > > On Mon, Mar 2, 2009 at 3:35 AM, Alain Roger wrote:
> >
> > >> Hi Wil,
> >
> > >> so if i understood well, having the following JSON:
> >
> > >>> {"records":[{"id":1,"abbreviation":"fre","description":"french"},{"id":2,"abbreviation":"eng","description"
> > >>> :"english"},{"id":3,"abbreviation":"ger","description":"german"},{"id":4,"abbreviation":"svk","description"
> >
> > >>> :"slovak"},{"id":5,"abbreviation":"spa","description":"spanish"},{"id":6,"abbreviation":"usa","description"
> > >>> :"american"},{"id":7,"abbreviation":"ita","description":"italian"},{"id":8,"abbreviation":"por","description"
> >
> > >>> :"portuguese"},{"id":9,"abbreviation":"cze","description":"czech"},{"id":10,"abbreviation":"rus","description"
> > >>> :"russian"},null,null,null]}
> >
> > >>> i should write :
> > >>    $.each(data.records, function(i,item){...});
> >
> > >> where "data.records" is the name of my JSON result...so records (in my
> > >> JSON).
> > >> am I right ?
> >
> > thanks Matt.

_________________________________________________________________
 25GB of FREE Online Storage – Find out more
http://clk.atdmt.com/UKM/go/134665320/direct/01/

Reply via email to