Mongodb objectID query

{ “_id”: { “$gt”: { “$oid”: “672d88422fdb59158b5b71db” } } }

This query doesn;t work in mongodb node. Any way around for this?

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Vijay_Ch,

Welcome to the community :cake:

Does it show any errors when you try to use it?

{
“$expr”: {
“$gt”: [“$_id”, { “$toObjectId”: “{{ $json.ID }}” }]
}
}

Hey @Jon ,this worked.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.