Using the filter bar

using 100YWeatherSmall I used the fiter bar to find a set of rows that had the following value { “st” : “x+49800-004800”}

It returns several documents. Including one with the _id =“5553a98ee4b02cf7150e344f”

I tried to filter on the above document like this and it returns nothing.

{ _id : “5553a98ee4b02cf7150e344f”}
{ “_id” : “5553a98ee4b02cf7150e344f”}
{ ObjectID : “5553a98ee4b02cf7150e344f”}

what am I doing wrong

The correct filter would be
{ _id : ObjectId('5553a98ee4b02cf7150e344f') }

Also make sure the filter bar is clean. It didn’t work for me the first tries because I use cut and paste haphazardly. :smiley:

The best way is to clean the filter bar, first. Then use a text editor and paste your filter statement into the text editor. You must copy/cut from the text editor and paste into MongoDB Compass filter bar.

Hope this works.

1 Like