In trying to call Object.bsonsize(doc) within mongosh in Compass but I’m getting: TypeError: Object.bsonsize is not a function. I also tried Object.bsonSize. According to version(), the mongosh I’m using is 1.1.8.
I assume this means it’s not available, although the docs suggest it is? Where am I going wrong here?
Thanks for the quick response Anna! Yes, reading the incorrect documentation is definitely one area I was going wrong! I don’t see any mention of bsonsize in that documentation, out of interest am I missing it or is that an omission? Is there a way from the docs that I should have been able to work that out?