Every example I see uses some kind of driver (how to do it in C#/java/etc.) There's the tojson function but there isn't a tobson one.
How can I convert a json string to bson object in the MongoDB console?
Every example I see uses some kind of driver (how to do it in C#/java/etc.) There's the tojson function but there isn't a tobson one.
How can I convert a json string to bson object in the MongoDB console?
You actually want to turn it into JSON so that you can insert it, not BSON.
This question has the answer as to how: Safely turning a JSON string into an object