[jQuery] Re: .GetJSON, retrieve a list of key/value from JSON object?

2007-12-19 Thread Scott Trudeau
for(key in myJSONobject) {
  var value = myJSONobject[key];
}

should get you started ...

On Dec 19, 2007 11:00 AM, Mathieu Dumais-Savard [EMAIL PROTECTED] wrote:


 Hi,

 I have no problem using jSON so far except that I am looking for a way
 to browse the items sent from the server to the client in such
 fashion:

 foreach key (keys myJSONobject) {
  var value = (myJSONobject[keys]) ;
 }

 Any hint?

 Thanks!




-- 
--
Scott Trudeau
scott.trudeau AT gmail DOT com
http://sstrudeau.com/
AIM: sodthestreets


[jQuery] Re: .GetJSON, retrieve a list of key/value from JSON object?

2007-12-19 Thread Mathieu Dumais-Savard

Thanks! That's exactly what I was looking for!!!

What data_type really is myJSONobject??? Shouldn't this be included in
the datatype section of the Jquery documentation under JSON object
section??? Where can I find complete reference for this object?

Thanks!

- Mathieu

On Dec 19, 11:31 am, Scott Trudeau [EMAIL PROTECTED] wrote:
 for(key in myJSONobject) {
   var value = myJSONobject[key];

 }

 should get you started ...

 On Dec 19, 2007 11:00 AM, Mathieu Dumais-Savard [EMAIL PROTECTED] wrote:



  Hi,

  I have no problem using jSON so far except that I am looking for a way
  to browse the items sent from the server to the client in such
  fashion:

  foreach key (keys myJSONobject) {
   var value = (myJSONobject[keys]) ;
  }

  Any hint?

  Thanks!

 --
 --
 Scott Trudeau
 scott.trudeau AT gmail DOT comhttp://sstrudeau.com/
 AIM: sodthestreets