How to get MongoDB collection sharding config using Node.js driver?
I need to retrieve information about a MongoDB collection's sharding configuration, specifically the shardKey and unique fields. While I can easily obtain this information using the sh.status() command in the MongoDB shell, I haven't been able to figure out how…