MongoDB commands are required to have one of the following forms (see below). They are structured in JSON notation and are required to have the field find
.
// variant 1 { find:"<query>", <filter> ... } // variant 2 { find:"<query>", filter: { ... } }
find
) being a field name from the find-query and the value being filter expressionfind
and a key filter
- which is a filter expressions.You can check the Filter Projection syntax from the MongoDB manual.
The <query>
of the find command also has two variants:
Filter for an event in the collection persistence.eventlog-system
// variant 1 { find: "persistence.eventlog-system", event:"CreateResource" } // variant 2 { find: "persistence.eventlog-system", filter: { event: "CreateResource" } }