我有一个包含架构的集合
{user_id:user id, user_details: {name: {age: {profession: {salary: amount}}}}}
示例条目是:
{user_id:001, user_details: {
abc:{21:{teacher:{salary:10000},
book-seller:{salary:10000}},
34:{farmer:{salary:5000}}},
xyz:{40:{manager:{salary:200000},
asst_manager:{salary:198900}}}
}
}
{user_id:002, user_details: {
abc:{19:{student:{salary:1000},
book-seller:{salary:10000}},
34:{farmer:{salary:5000}}},
xyz:{45:{manager:{salary:200000},
asst_manager:{salary:198900}}}
}
}
有没有办法查询用户名为“abc”的所有文档?