To view result pretty
db.yourcollection.find().pretty()To view the commands sent to mongodb
For example, the query is sent by mongoose and in the code the query contains variable, how to view the exact query executed on MongoDB?db.setLogLevel(3, 'command')
db.setLogLevel(3, 'query')
https://docs.mongodb.com/manual/reference/method/db.setLogLevel/
No comments:
Post a Comment