Skip to content
Studio 3T - The professional GUI, IDE and client for MongoDB
  • Tools
    • Aggregation Editor
    • IntelliShell
    • Visual Query Builder
    • Export Wizard
    • Import Wizard
    • Query Code
    • SQL Query
    • Connect
    • Schema Explorer
    • Compare
    • SQL ⇔ MongoDB Migration
    • Data Masking
    • Task Scheduler
    • Reschema
    • More Tools and Features
  • Solutions
  • Resources
    • Knowledge Base
    • MongoDB Tutorials & Courses
    • Tool/Feature Documentation
    • Reports
    • Case Studies
    • Whitepapers
    • Blog
    • Testimonials
    • Community
  • Contact us
    • Contact
    • Sales Support
    • Feedback and Support
    • Career
    • About Us
  • Store
    • Buy Now
    • Preferred Resellers
    • Team Pricing
  • My License
  • Download
search

Better MongoDB Field Comparisons With Tables #Studio3T_AMA

Posted on: 01/07/2021 (last updated: 18/08/2021) by DJ Walker-Morgan

Q: When I query MongoDB, I find it hard to read and compare the results between documents, especially when there are embedded documents. Can Studio 3T help?

Welcome to the first Studio 3T Ask Manatees Anything – #Studio3T_AMA. Want to know how to use Studio 3T to make your MongoDB life better? Just tweet and use #Studio3T_AMA or email [email protected].

A: As you know, MongoDB is built around JSON and JSON is designed to be human readable. As you found, as soon as there’s any depth in a JSON document though it becomes quite hard to parse the relationships between different fields. And that’s doubly so when you want to compare deeply embedded values.

The Studio 3T Table view displays the fields as columns in the table and behaves more like a spreadsheet than just a table. That means you can tab into it, or click directly on a field, and navigate with the keyboard.

A Studio 3T Table where the Airport, Time and Statistics fields are hidden

Where there are embedded fields or arrays, the number of embedded objects within is shown. Clicking into any one of those embedded fields to view their contents, displays just the id and contents for all the records. So if we clicked on a field in the airport column the view would change to:

A Studio 3T Table zoomed in on the Airport Fields

You can also do that by navigating to the embedded field you want to see and pressing enter to descend into the contents of that embedded field. To return to the previous level, just tap backspace and you ascend back to the previous view. You could say the Table view is a spreadsheet with hidden depths.

If you are comparing documents, you’ll likely want to view those embedded fields alongside the other data in each document. For that you can pick your cell and select Show Embedded Fields from the context menu, or tap command-enter and the fields will be virtually promoted up to the current level:

A Studio 3T Table View with the Airport embedded fields showing

Notice how both fields within the “Airport” embedded field are now immediately visible. Want to see all embedded fields? Show All Embedded Fields is there on the context menu too. There’s no shortcut key for that yet. There’s also Hide All Embedded Fields for when you want to fold the table back to its most minimalist form.

When you do show the embedded fields, you will notice that you can still see the field that contains the embedded field. If that is a bit visually noisy for you, the Show/Hide Column function (Control/Command-T) can toggle a column in and out of the view. You’ll find it on the context menu under Column along with Make All Columns Visible to undo all your toggling.

Your expansion selections are sticky so you can come back to a collection and still see it expanded the way you left it. Over in Preferences, there’s an option to set the default to show (or hide) all the embedded fields by default when you first open a Table view up.

And yes, you can still flip to the Tree and JSON views if you want and return to the Table view. Tree and JSON views can also be navigated around with the keyboard. You can navigate the Tree with the keyboard too, and the JSON view is a traditional read-only text view you can cursor around.

You’ll find these views and options throughout Studio 3T and getting a good handle on them is the key to navigating MongoDB data smoothly.

Further Reading: Flattened, Nested MongoDB Collections, Fields & Arrays with Table View


How helpful was this article?
This article was hideous
This article was bad
This article was ok
This article was good
This article was great
Thank you for your feedback!

About The Author

DJ Walker-Morgan

Dj has been around since Commodore had Pets and Apples grew everywhere. With a background in Unix and development, he's been around the technology business writing code or writing content ever since.

Related articles

  • Exercise 3: Adding a computed ratio field based on the converted lookup field
  • What’s New in Studio 3T 2021.10 | Value Search, Better Task Scheduling and Import Data Masking
  • Why can’t I change the _id field? #Studio3T_AMA
  • The Quickest Way to Change a Field Type in MongoDB
  • Lesson 3, Exercise 4: Changing the field order in the aggregation pipeline

Tags

academy aggregation AMA atlas community connections date tags export features hackolade import intellishell JSON knowledge base migration modelling mongodb mongoodb productivity query regex releases schema security SQL Studio 3T tasks tips updates webinar windows

Browse by MongoDB topic

  • Connecting to MongoDB
  • Database Administration & Security
  • Getting Started with MongoDB
  • Getting Started with Studio 3T
  • Import/Export
  • Job Automation & Scheduling
  • MongoDB Aggregation Framework
  • MongoDB/Studio 3T Workshops
  • Performance
  • Query & CRUD Operations
  • Schema
  • Studio 3T Licensing
  • Support and other resources
  • Working with MongoDB & SQL
  • Working with MongoDB Atlas

Studio 3T

MongoDB Enterprise Certified Technology PartnerSince 2014, 3T has been helping thousands of MongoDB developers and administrators with their everyday jobs by providing the finest MongoDB tools on the market. We guarantee the best compatibility with current and legacy releases of MongoDB, continue to deliver new features with every new software release, and provide high quality support.

Find us on FacebookFind us on TwitterFind us on YouTubeFind us on LinkedIn

Education

  • Free MongoDB Tutorials
  • Connect to MongoDB
  • Connect to MongoDB Atlas
  • Import Data to MongoDB
  • Export MongoDB Data
  • Build Aggregation Queries
  • Query MongoDB with SQL
  • Migrate from SQL to MongoDB

Resources

  • Feedback and Support
  • Sales Support
  • Knowledge Base
  • FAQ
  • Reports
  • Case Studies
  • White Papers
  • Testimonials
  • Discounts

Company

  • About Us
  • Blog
  • Careers
  • Legal
  • Press
  • Privacy Policy
  • EULA

© 2022 3T Software Labs GmbH. All rights reserved.

  • Privacy Policy
  • Cookie settings
  • Impressum
When you click "Accept", you are agreeing to cookies being on your device. They may improve site navigation, site usage analysis, or the relevance of messages. It is up to you which cookies are enabled. Read our Privacy Policy.
Manage cookies
Accept
✕

Privacy Preference Center

A cookie is a small file of letters and numbers that is downloaded on to your computer when you visit a website. Cookies are used by many websites and can do a number of things, eg remembering your preferences, recording what you have put in your shopping basket, and counting the number of people looking at a website. In the form below you can choose which cookies, except for essential cookies, to allow or disable.

Accept all cookies

Manage consent preferences

Essential cookies are strictly necessary to provide an online service such as our website or a service on our website which you have requested. The website or service will not work without them.

Performance cookies allow us to collect information such as number of visits and sources of traffic. This information is used in aggregate form to help us understand how our websites are being used, allowing us to improve both our website’s performance and your experience.

Functional cookies collect information about your preferences and choices and make using the website a lot easier and more relevant. Without these cookies, some of the site functionality may not work as intended.

Social media cookies are cookies used to share user behaviour information with a third-party social media platform. They may consequently effect how social media sites present you with information in the future.

Accept selected