Skip to content

Instantly share code, notes, and snippets.

@pengwynn
Created April 3, 2010 19:39
Show Gist options
  • Save pengwynn/354781 to your computer and use it in GitHub Desktop.
Save pengwynn/354781 to your computer and use it in GitHub Desktop.
> db.testdots.save({foo: 'bar', tags: ['web2.0', 'mongofail']})
> db.testdots.findOne();
{
"_id" : ObjectId("4bb7992356756e741e3574a1"),
"foo" : "bar",
"tags" : [
"web2.0",
"mongofail"
]
}
>
> db.testdots.find({tags: 'web2.0'})
{ "_id" : ObjectId("4bb7992356756e741e3574a1"), "foo" : "bar", "tags" : [ "web2.0", "mongofail" ] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment