Hi,
Can anyone help me to get the "namecount" using eval, see the data
belows;
>> namecount =
eval('':name=>{1=>{1=>{"first_name"=>"leon",
"last_name"=>"may"},
2=>{"first_name"=>"lion",
"last_name"=>"king"}}}'')
I want an output should be "namecount = 2", because I''m
counting how
many "name" in one raw (1record).
Thanks in Advance!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---