I would like to paste a Mongo ObjectId and it automatically query on it
I would like to paste a Mongo ObjectId and it automatically query on it.
Right now when I go to type something into the query filter field it'll automatically add {}
A great next step is if I [ctrl} + [v] paste in a MongoDB ID, then it automatically turns it into an _id query.
Step 1: Copy "64f046fb304cee6fa007d935"
Step 2: Paste int othe filter (Query) field
Step 2b: MongoDB compass converts my text into the query {_id: ObjectId('64f046fb304cee6fa007d935')}
Step 3: Click [Find] (or maybe it can even automatically do that?
Currently I have to type"
_id: ObjectId('<now paste in the objectId>')
This is something many people do very often. So whilst it's only a small step, it would nicely improve productivity.
You should be able to detect an ObjectId being pasted (or manually typed?).
![](https://secure.gravatar.com/avatar/7ce6430cb64cf1e8bc05a867f862f2b6?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
Jason Lowder commented
I don't know if something in the ObjectId states what collection it is in, but often times I have to do some digging to see which collection dev is referencing by a returned ID. Having it pull up the data without stating which collection it is in would also be a nice feature.
-
Michael Kubler commented
I would still love to see this.
Given I can click in the Query field and I'll have {} automatically added, this should be doable.