Get BinData UUID from Mongo as string
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I currently have some ids stored in Mongo as UUIDs (necessary for processing). They get returned like this: "_id" : new BinData(3, "JliB6gIMRuSphAD2KmhzgQ==") What would be an easy way to turn this value into a string for debugging? Just to be clear - the application can handle the data fine. I just need a way to get the actual UUID from Mongo quickly. 回答1: The answer to your question is more complicated that you would expect! The main reason it's complicated is that for historical reasons (unfortunately) different drivers have written UUIDs