Skip to content

Instantly share code, notes, and snippets.

@mattly
Created December 21, 2009 06:05
Show Gist options
  • Select an option

  • Save mattly/260811 to your computer and use it in GitHub Desktop.

Select an option

Save mattly/260811 to your computer and use it in GitHub Desktop.
irb(main):010:0> pp = d['things'].find.map{|p| p}
=> [{"_id"=>4b26a1aed12cf2e15b000001, "title"=>"testing"}, {"_id"=>4b2ece72c055229bc2000001, "title"=>"test"}, {"_id"=>"4b2ece72c055229bc2000001", "body"=>"updating the previous document"}]
irb(main):012:0> pp[1]['_id'].class
=> Mongo::ObjectID
irb(main):013:0> pp[2]['_id'].class
=> String
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment