MongoDB update field value as ObjectId

let’s say you want to do a query from a id.

  1. Choose the Find operation
  2. Choose the Collection you want to get data from
  3. and write the expression like:
{ "$expr": { "$eq": ["$_id", { "$toObjectId": "{{$json["someId"]}}" }] } }

this expression will convert a string to a ObjectId.

@gravitoad do you need something different? Just let me know.