I'm not quite sure which part you're asking about. To get and interact
with your example data, you could do something like:

$.getJSON('/url/to/json', function(data) {
  for(var i = 0; i < data.models.length; i++) {
    $('#output').append('<div>' + data.models[i] + '</div>'); // or
whatever you want to do with it.
  }
});

Does that help? There's lots of info on JSON out there. Google can
help you with that.

--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.
>
>

Reply via email to