Using MongoDB for Digital Shadow / Track & Trace in the United Manufacturing Hub

How to query data in MongoDB Compass

Learn how to query data in MongoDB Compass

How to query data in MongoDB Compass

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.


  1. In MongoDb Compass go to your desired database/collection.
  2. You can now view your documents and look for the parents you want to query.
  3. 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.

Stay up-to-date

Subscribe to the UMH Learning Hub Newsletter to receive the latest updates and gain early access to our blog posts.