Hello!
I have a collection of this type:
{ _id: ObjectId("53f6ea88efd71760ee000002"), title: "foo", published: "2014-08-22 01:26:21 UTC", image: "s3_foo.jpg", summary: "foo foo", categories: ["foo","bar"], content: "foo sting text", author: "bar", from: ["bar"], shop_id: 12279649167164, }
I want to get all the records from shop_id: 12279649167164 and their date.
pry(shop)> @shop_id = "12279649167164" pry(shop)> a = collection.find( {'shop_id' => @shop_id}, fields: ['published'] }).map {|e| pe} pry(shop)> []
I do not understand what the problem is. I use Ruby 2.1.2 and mongo-ruby-driver