DEV Community

Cover image for How to Explore and Work with MongoDB Data Visually
VisuaLeaf
VisuaLeaf

Posted on • Originally published at visualeaf.com

How to Explore and Work with MongoDB Data Visually

Opening a MongoDB collection is quite easy.

But understanding the data inside is the hard part.

A few JSON objects may be easy to handle, but as the data grows and the number of objects increases, it becomes really hard to visualize what is going on.

That’s where most people are stuck.

Not because MongoDB is complicated, but because they haven’t learned how to explore the data yet.

In this guide, we are going to walk you through a series of steps and focus on the most important things you need to know about MongoDB, like:

  • How to read your data
  • How to understand your data
  • How to filter your data
  • How to query your data without getting confused

A Quick Example

We’ll use a simple payments collection:

{
  amount: 129,
  courseId: ObjectId("69af3833c12d7f138927952e"),
  currency: "USD",
  method: "Credit Card",
  status: "completed",
  paidAt: ISODate("2026-02-28T14:10:10Z")
}
Enter fullscreen mode Exit fullscreen mode

What Are We Trying to Do?

Before you start typing your queries, take a second and ask yourself:

“Do I actually understand what’s inside this collection?”

If you answer no, then you’re essentially guessing every time you write a query.

Let’s take a look at the data instead of going straight into code.

Step 1: Explore Your Data

The first thing we should do is take a look around and see what the data actually looks like.

Use the tree view to:

  • Expand fields
  • Explore nested objects
  • Understand the structure of the documents

It’s like clicking through folders to see what’s inside.

You don’t have to understand everything right now, just get a feel for the data

mongodb-tree-view-data-exploration

MongoDB tree view showing documents and data types

Step 2: View Your Data in Table Format

Once you understand the structure, switch to a table view.

This makes it much easier to compare documents and spot patterns.

When you're using a tool like VisuaLeaf, you can switch between these views easily.

Now, each row is a document, and each column is a field.

For instance:

  • What payments are in USD?
  • What amount is greater?
  • What status is used more?

Here’s a simple way to think about it:

  • Tree view → understand the structure
  • Table view → compare the data

mongodb-table-view-data-exploration

MongoDB table view showing documents as rows and fields as columns

Step 3: Search and Edit Your Data

You already know the structure of your data, as well as the way documents compare to each other.

You can finally start working with your data.

You might want to:

  • search for something specific
  • update the payment status
  • update the method
  • correct incorrect data

Here, the data editor can help you.

You are no longer simply looking at your data, you are working with it.

If you can search and edit your data, everything makes sense.

mongodb-edit-and-search-data

MongoDB table view showing how to search and edit values in documents

Step 4: Filter Your Data (Query Builder)

Once you are comfortable working with your data, the next step is to focus on specific results.

For example, you might want to see only completed payments in USD.

Instead of writing code, you can use a visual query builder.

You simply:

  • select the field
  • choose the value
  • apply the filter

In tools like VisuaLeaf, you can even build queries using drag-and-drop, without writing any code.

Example:

{ 
  currency: "USD",
  status: "completed"
}
Enter fullscreen mode Exit fullscreen mode

mongodb-query-data

Build and refine your queries visually, and see results update instantly.

Step 5: Query Your Data (SQL or Advanced Queries)

When you’re confident with exploring and filtering your data, you’re ready to begin writing queries yourself.

For example, let’s say you want to see only payments in USD, sorted by the newest ones first.

In MongoDB

db.payments.find(  
{ currency: "USD" },  
{ amount: 1, currency: 1, status: 1, paidAt: 1 }  
).sort({ paidAt: -1 }).limit(10)
Enter fullscreen mode Exit fullscreen mode

MongoDB Query Shell

In SQL

SELECT amount, currency, status, paidAt
FROM payments
WHERE currency = 'USD'
AND status = 'completed'
ORDER BY paidAt DESC
LIMIT 10
Enter fullscreen mode Exit fullscreen mode

mongodb-sql-query

Both queries return the same result, just using different approaches.

MongoDB works with documents and step-by-step operations, while SQL describes the result in a more structured way.

The key point is this:

It’s not about the syntax -> it’s about understanding your data.

You don’t start with queries.

You get there after exploring and filtering your data first.

Putting It All Together

Here’s the workflow you should follow whenever you open a new MongoDB collection:

  1. Browse the documents
  2. Understand the structure
  3. Compare documents in table view
  4. Edit or clean up inconsistent values
  5. Filter visually
  6. Write your queries with confidence

Each step is building on the last one. Everything is easier than it was before.

A Small but Important Lesson

While working with this dataset, we encountered an interesting fact:

Some documents were missing values.

For example, if the method field is not filled in, then such a payment might not be included in a filter.

{ method: "Credit Card" }
Enter fullscreen mode Exit fullscreen mode

This query will only retrieve documents where there is a method and where method is equal to "Credit Card".

If a payment does not have a method, it will not be returned at all, even though it does exist.

This is why it is important to have consistent data before you start to query it.

Final Thoughts

With MongoDB, you get a lot of flexibility.

The hardest part is to understand your data.

The good part is, you don't have to dive into complex queries right away.

By:

  • exploring your data
  • switching between views
  • visually filtering data
  • and experimenting

You can understand your data much faster.

If you want to explore your data this way, you can try it directly in VisuaLeaf.

Top comments (0)