i have a problem, when trying to create a new field in mongoose aggregate.
when I try to convert a number to a string. where the number has digits 15 and above.
but the result of adding the string e+15
{
$addFields: {
stringCode: {$toString : "$number_code"}
}
},
{
$lookup: {
from: "member",
localField: "number_code", //string
foreignField: "stringCode", // intiger to string
as: "member",
},
}
the example number I’m trying to change is 123456789123456
and the result is “stringCode”: “1.2345e+15”
I hope the result is “123456789123456”