So I have been stuck on this problem for a while. I have just started exploring mongodb and am trying to figure out loads of things. So I wanted to use the command “listCollections” to see things like the validators. But when I do this It doesn’t even show the firstBatch and only shows me that there is an Object. I was able to solve this problem in the shell (mongosh) with the “inspectDepth” configuration but I can’t find a solution in Node with the MongoDB driver.
So I have this:
let result = db.command({
listCollections: 1,
});
result = Promise.resolve(result).then(result => console.log(result.firstBatch));
And as a response I get this:
I would like it to show the whole Object (and all nested Objects) instead of just telling me that there is an Object. Can someone help?