1

To simplify the question, let's assume I have a document like this:

Names
{
  Name: "Tom",
  MiddleName: "John"
}

I have to find documents where Name and MiddleName are equal.

{
    $and : [
        {"Name": {$in: ["Piotr", "John", "Adam"]}},
        {"MiddleName": {@eq: "this.Name"}}
    ]    
}

How to do it properly, as above example doesn't work.

Horyzont
  • 59
  • 1
  • 4

1 Answers1

0

Better to use $expr. See playground here. AFAIK, $expr is not supported in typed form by .net driver. See here, how you can run arbitrary MQL query in raw form.

dododo
  • 3,872
  • 1
  • 14
  • 37