I have date in mongo in below format
_id: 10_-0043_-00
My JS file is :--
use test
db.getCollection('test').find({_id : "10_-0043_-00"},{ _id : 1})
I am running the query using unix box as below :--
mongo localhost:27048/test -u user -p mongo123 < mongo.js > mongo.txt
But when I check the output it is coming as
10-0043-00
Similar is case when I am having \ or = or "
145678-TEST-23" becomes 145678-TEST-23\ , ABC100-10TEST\B becomes ABC100-10TEST\\B
Any idea to get this fixed ?
Regards