0

Below one of the document inside my test.users collection.

{
  "_id": {
    "$oid": "62ef8c502935226353a97efb"
  },
  "workspaces": [
    {
      "$oid": "62ef8c722935227aaca97eff"
    }
  ],
  "emailConfirmed": true,
  "ipInfo": {
    "ip": "191.23.43.218",    
    "region": "Krasnodarskiy",
    "country": "RU",    
    "timezone": "Europe/Moscow"
  },
  "__v": 0
}

I want to count the number of country of RU in test.users collection in MongoDB compass, how should I do it? I only saw filter, project, sort, collation under Documents as follows in Mongo DB compass, is there a way I can directly enter a mongoDB query? enter image description here

william007
  • 17,375
  • 25
  • 118
  • 194

1 Answers1

1

You can use the mongosh shell present below, or you can directly check the count below FIND button after running your query, text is like Displaying document x of y:

enter image description here

enter image description here

Charchit Kapoor
  • 8,934
  • 2
  • 8
  • 24