For this tutorial we are building a query for a parent-child relation. If you need to query more than a simple key:value
pair take a look at the MongoDB Compass documentation.
Instructions
- In MongoDb Compass go to your desired database/collection.
- You can now view your documents and look for the parents you want to query.
- Type in Filter {"message.parents.0": "<"Parent">"} and click on Find.
4. This will now filter all documents after the chosen parent.
5. If you now want to process documents (e.g. Group values from multiple documents together, Perform operations on the grouped data to return a single result) try out the Aggregation Pipeline Builder in MongoDB Compass.