How to return float value with zero fraction in MongoDB? -
i trying retrieve float values mongodb 0 fraction. doesn't work expect to.
i.e. inserted doc:
db.collection.insert({ _id: 1, floatval: 10.0 })
while retrieving gives as:
{ "_id": 1, "floatval": 10 }
whereas want result as:
{ "_id": 1, "floatval" : 10.0 }
Comments
Post a Comment