"[Solved] Read MongoDB Operator criteria - How can I query by the document id"
mrmikev
New Altair Community Member
I have a basic process with a single Read MongoDB operator. I want to pull the document based on the document _id. I'm attempting to use the criteria input for this. I am able to pull a specific document based on other fields, but I'm getting the following error message when I attempt to pull based on the document _id:
Could not parse the provided document as JSON/BSON object.
Here's what I'm using:
{ "_id" : { $eq: ObjectId("55284eeb182226e3107e9160") } }
I've tried a number of approaches, but so far I've come up empty. Any direction you can provide is appreciated!
Cheers
Could not parse the provided document as JSON/BSON object.
Here's what I'm using:
{ "_id" : { $eq: ObjectId("55284eeb182226e3107e9160") } }
I've tried a number of approaches, but so far I've come up empty. Any direction you can provide is appreciated!
Cheers
Tagged:
0
Answers
-
I resolved my issue by doing this:
{ "_id" : { $oid: "55284eeb182226e3107e9160" } }
Cheers!0