Hi there,
 I'm newbie here and I have a problem with the connection with MongoDB.
The connection among Rails and MongoDB works, but I don't know, how to
print only one "column" from document.
If I'm trying following a part of code:

puts db["testCollection"].find_one().inspect

So I'will get the entire structure of BSON, as:

{"_id"=>#<BSON::ObjectID:0x118576c ...>, "name"=>"MongoDB",
 "info"=>{"x"=>203, "y"=>102}, "type"=>"database", "count"=>1}


But I would like to ask you, how is possible to get only the item eg
"name"... I am searching this information a long time, but no result
yet...


I will very glad for everything help, thanks a lot!

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to