Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

print from mongo console to file sample.json

mongo localhost:27020/miscdb --eval "printjson(db.collection_name.findOne({}))" > sample.json
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #print #mongo #console #file
ADD COMMENT
Topic
Name
3+7 =