In mongoDB compass I am getting no result with the below filters. Not sure what I am doing wrong.
{user: {uid: 'ttorone'}}
{user: {_id: ObjectId("5b9fc9567a1f050026a8bbda")}}
What I want is to filter out this document (where user-> uid is 'ttorone'). User is also an object here.
Try like this {"user.uid" : "ttorone"}
For example if I would like to get all movies documents that have "imbd.id" equals to 1, I put the following filter in the compass, see the image below. Your situation is similar. You are searching for property value in the embedded object.