a)
$ vim myquery.js
printjson(db.media.find().toArray())
b)
mongo mediadb myquery.js
mongo mediadb myquery.js > output.json
mongo [host]/[dbname] -u [username] -p [password] myquery.js > output.json
$ vim myquery.js
printjson(db.media.find().toArray())
b)
mongo mediadb myquery.js
mongo mediadb myquery.js > output.json
mongo [host]/[dbname] -u [username] -p [password] myquery.js > output.json
No comments:
Post a Comment