This has nothing to do with mongoose. It mainly depends on whether this conversion function is provided in the aggregate operation of mongodb. If there is a function that provides string to number, you can convert it in the $project operation. I scanned the mongodb documentation https://docs.mongodb.com/v3.2... I did not find this function.
This has nothing to do with mongoose. It mainly depends on whether this conversion function is provided in the aggregate operation of mongodb.
If there is a function that provides string to number, you can convert it in the $project operation.
I scanned the mongodb documentation
https://docs.mongodb.com/v3.2...
I did not find this function.
Consider using mapreduce.