ObjectId is not defined
Digital-Thor opened this issue · 1 comments
Digital-Thor commented
Thanks for this great Mongo V3 node @ozomer! One question though, have you seen the Mongo find problem where:
msg.payload = { "_id": ObjectId("5bb59066e7179a6602f38d4e") }
Debug Console --> "ReferenceError: ObjectId is not defined"
I'm having the same trouble. I've tried stringifying the value:
{ "_id": "ObjectId(\"5bb59066e7179a6602f38d4e\")" }
as well omitting the ObjectId: { "_id": "5bb59066e7179a6602f38d4e" }
Any suggestions?
PS. installing node-red-contrib-objectid
didn't help.
Digital-Thor commented
Okay I got it working. Targetting the id field in node-red-contrib-objectid
was the problem. Thanks.