given
new Ajax.Request(
...
onComplete: function( transport ){
var sort_list = transport.responseText;
//This equals =
{"dist":{"37":{"NAME":"test
one","OTHER":"value
one"},"38":{"NAME":"test
//two","OTHER":"value
two"}},"stuff":{"40":{"NAME":"test
three","OTHER":"value
//three"},"41":{"NAME":"test
four","OTHER":"value four"}}}
sort_list = sort_list.evalJSON();
sort_list.each( function( val, key ){
console.log( ''val '' + val + ''\nkey
'' + key );
});
}
Here is the problem
The each function does not run or put out the output.
So my question is does the JSON object allow us to iterate over it, if
so what am I doing wrong.
--
Edward Grant
themasternone-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
RPGA #342155
CAMARILLA #US2002022579
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---