Skip to content

Instantly share code, notes, and snippets.

@ghais
Created June 8, 2011 01:23
Show Gist options
  • Save ghais/1013598 to your computer and use it in GitHub Desktop.
Save ghais/1013598 to your computer and use it in GitHub Desktop.
> db.Test.insert({something:123, engagementResults:[{d:1}, {d:2}]});
> db.Test.find({d:1})
> db.Test.find({"engagementResults.d":1})
{ "_id" : ObjectId("4deecede6b5e82cdaf01663b"), "something" : 123, "engagementResults" : [ { "d" : 1 }, { "d" : 2 } ] }
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment