db.Hours.aggregate(
{$addFields: {TrueAmbientTemp: { {$add : [-8 , {$multiply : ["$AmbientTemp" , 47]}]}}}}
)
I am trying to add a new field TrueAmbientTemp which is a calculation field. The above give an error.
db.Hours.aggregate(
{$addFields: {TrueAmbientTemp: { {$add : [-8 , {$multiply : ["$AmbientTemp" , 47]}]}}}}
)
I am trying to add a new field TrueAmbientTemp which is a calculation field. The above give an error.
Copyright © 2021 Jogjafile Inc.
You miss some semicolons.
Example:mongoplayground
update:you can change
updatetoupdateManyExample:mongoplayground