Eu usei o convert:
db.contas.aggregate([
{
$project: {
_id : 0,
valor: 1,
dividido : {
$divide: [
{
$convert: { input: "$valor", to: "double", onError:0, onNull:0}}, 2
]
}
}
}
])
db.contas.aggregate([
{
$project: {
_id : 0,
valor: 1,
multiplicado : {
$multiply: [
{
$convert: { input: "$valor", to: "double", onError:0, onNull:0}}, 2
]
}
}
}
])
Espero ter ajudado