I\'m using Node.js program to insert data into a MongoDB database. I have inserted data into a collection named \"repl-failOver\".
var mongoClient = require(\"mo
You are getting this error from accessing collections with specific characters (-, _, ). I explained the workaround here, but basically all you need is to do
-
_
db.getCollection("repl-failOver").insert(...)