xxxxxxxxxx
/*
The first non-null input expression value found.
A replacement expression value if all input expressions evaluate to null.
*/
db.inventory.aggregate(
[
{
$project: {
item: 1,
description: { $ifNull: [ "$description", "Unspecified" ] }
}
}
]
)
xxxxxxxxxx
db.demo764.find({"LoginUserName":"Chris","LoginPassword" : { '$ne': null } });