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

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -