skip to Main Content

How can I insert json string to MongoDB?

I have a json string. Like this: "{"http_requests":[{"http_requests":{"code":"400","method":"PUT","value":89}},{"http_requests":{"code":"200","method":"PUT","value":45}}]}" I want to insert this json to mongodb. But I have error in my code. The error is "cannot transform type string to a BSON Document: WriteString can only write while positioned…

VIEW QUESTION
Back To Top
Search