0

I am using MongoDb compass, and I have documents with a lot of keys, and I want to find the key of the document by the value. For example something like where value = "123" and it will return the Key1, is there a way to do it?

{
    "_id": "57a443c74d854d192afcc451",
    "Key1": "123",
    "Key2": "aaa"
}
LetMeLearn
  • 11
  • 3
  • Here is a similar question and answers: [MongoDB Query Help - query on values of any key in a sub-object](https://stackoverflow.com/questions/19802502/mongodb-query-help-query-on-values-of-any-key-in-a-sub-object) . – prasad_ Mar 09 '22 at 01:21

0 Answers0