Select documents with nested collection without something

Here is my test data

[
  {
    "id": 1,
    "last_email_sent": [
      {
        "letterId": 1,
        "timestamp": 555
      },
      {
        "letterId": 2,
        "timestamp": 666
      }
    ]
  },
  {
    "id": 2,
    "last_email_sent": [
      {
        "letterId": 2,
        "timestamp": 777
      }
    ]
  },
  {
    "id": 3,
    "last_email_sent": [
    ]
  }
]

Can't understand is it possible to select all documents with letter id=2 and timestamp > 554 OR have no objects in nested collection with letterId = 1. Regarding to my data - all three documents must be returned.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.