I am having following document structure in mongo db
{
"_id": {
"name": "XYX",
"rol_no": "1",
"last_update_dt": "2021-05-10",
},
"stud_history": [{
'std': 'xyz',
'age': '16'
},
{
'std': 'mnl',
'age': '15'
}]
}
and i want to query data like
name:xyz, rol_no:1, last_update_dt: 2021-05-10 and age:16
here i have mentioned only 1 student but i need to query similarly for multiple students.
So my output will be
"_id": {
"name": "XYX",
"rol_no": "1",
"last_update_dt": "2021-05-10",
},
'stud_history': {
'std': 'xyz',
'age': '16'
}
Please help