Haris wrote:> I have a JSON string that I want to convert to Normal JS Array and
> iterate with .each() method to update a table.
>
> What''s the function to convert JSON string to an Array?
var my_array = eval(''('' + json_string +
'')'');
That''s plain JS. Or in prototype you can do
var my_array = json_string.evalJSON();
--
Michael Peters
Developer
Plus Three, LP
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---