{
"deviceId": "A",
"users": [
{
"id": 1,
"status": "ac",
"DELETE": true
},
{
"id": 2,
"status": "ac"
},
{
"id": 3,
"status": "ac"
},
{
"id": 4,
"status": "ac"
},
{
"id": 5,
"status": "deac"
},
{
"id": 6,
"status": "ac"
}
]
}
i have a document like top and i want to search user by value of status or by DELETE field exists status. But my code not work.
Use $elemMatch