Thats it! I was referring to the length as 'count'. Thats why my for
loop wasn't executing, and thats why I couldn't echo my data in the
browser.

Thanks!

So, should I treat my JSON object like a Javascript multi-dimensional
array?

On Aug 16, 10:20 am, "Erik Beeson" <[EMAIL PROTECTED]> wrote:
> Right, 'count' doesn't have any special meaning that I know of. What are you
> expecting it to be? Arrays have a special property called "length", which
> you could access like json.models.length, but Objects (like your json
> variable), don't necessarily have this special property.
>
> --Erik
>
> On 8/16/07, jeff w <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > I am new to jQuery, and have started to play with JSON,but I need some
> > info about how I refer to the JSON Object once it is  returned from
> > the server. I know I can loop through the contents of the object, and
> > I can use json.count, but I am really unsure about the correct syntax
> > to target the data that I need. Can anyone provide a link to a
> > tutorial or some other help?
>
> > Here is the JSON object that I need to return from the server:
>
> > {"models": ["MDX SUV", "RDX SUV", "RL Sedan", "TL Sedan", "TSX
> > Sedan"]}
>
> > Thanks for your help.
>
> > ************
>
> > since writing this, I have made a guess at what might work. I
> > confirmed that the data is returning as stated above (using Firebug),
> > but when I echo json.count, i get 'undefined'. does that make sense?

Reply via email to