Hi i have a data model like this
module{
name: "xx",
sa: [
{
sa_name: "yy",
fact: [
fact_name: "zz"
],
dim: [
dim_name: "qq"
]
}
]
}
I have sa embedded in module and fact and dim embedded inside sa.
I tried db.coll.find({"module.sa.fact.name":"zz"},{}) is not working where as for single nest db.coll.find({"module.sa.name":"yy"},{}) is working fine.
How can i query this sub document inside sub document.
fact : [ fact_name : "zz" ]should befact : [ { fact_name : "zz" } ]