My mongodb document contains object CarData with several properties inside.
{
_id: ...,
Name: "",
CarData: {
carId: null,
ownerName: "",
ownerPhone: "",
AdditionalInfo:{
RefNr: ""
validDoc: true
}
}
}
I know I can query the whole collection
{ "CarData": { $exists: true } }
but I don't know how to query whole collection with
CarData exists and is not null
and ownerName != ""
and AdditionalInfo exists and != null
and AdditionalInfo.validDoc == true