{
\"_id\":{
\"oid\":\"4f33bf69873dbc73a7d21dc3\"
},
\"country\":\"IND\",
\"states\":[{
\"name\":\"orissa\",
\"direction\"
If you don't want to use aggregate
, you can do it pretty easily at the application layer using underscore (included by default):
var country = Groops.findOne({"property":value);
var state _.where(country, {"state":statename});
This will give you the entire state record that matches statename
. Very convenient.