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
[EMAIL PROTECTED]
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---