Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
$setchanges the values of fields. $project can show and hide fields, but it can'tset values of fields.
$set
changes the values of fields. $project can show and hide fields, but it can't
set values of fields.
$project,$set, and $addFields are all interchangable.
$project,
$set, and $addFields are all interchangable.
$set is used to create or change values of newor existing fields. $project can be used to create or change the value offields, but it can also be used to specify which fields to show in thedocuments in the aggregation pipeline.
$set is used to create or change values of new
or existing fields. $project can be used to create or change the value of
fields, but it can also be used to specify which fields to show in the
documents in the aggregation pipeline.
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!