I am new to MongoDB. And now i got a puzzle: say i've got a query workable in mongo console
{
"_id": {
"$oid": "50a5e1cd703d7e9c65326bf9"
},
"people":{
"name":"arthur",
"tele": "001-837475"
"address":{
"country":"us",
"state" : "CA",
"city" : "LA"
}
}
}
I've got pretty many record like this. & I want to query for all people who come from CA. The query below works well in mongo shell
db.test.find({"people.address.state":"CA"})
But I must do the query in Java.
PS: I don't want to use other opensource packages. just the mongodb-java-driver would be delightful.
Thanks.