Theres a little extra wrapping there thats not needed like the builder
- heres a cleaned up example:
import com.mongodb.casbah.Imports._
val coll = MongoClient()("test")("testB")
coll.drop()
coll += MongoDBObject("records" -> List(MongoDBObject("n" -> "Name", "v" -> "Will"),
MongoDBObject("n" -> "age", "v" -> 100)))
val elemMatch = "records" $elemMatch MongoDBObject("n" -> "Name", "v" -> "Will")
coll.find(elemMatch).count