Query Results
View and interact with MongoDB query results in multiple formats optimized for different use cases.
Overview
Agent M's query results system provides flexible ways to view and work with your MongoDB data. You can:
- View results in multiple formats including table, tree, JSON, and raw views
- Interact with data through sorting, filtering, and pagination
- Export results to various formats for external use
- Save useful queries as favorites for future reference
Result Views
Agent M provides four different ways to view your query results, each optimized for different scenarios and user types:
Table View
Default and most user-friendly option, displaying data in a clean, spreadsheet-like format.
- Perfect for business users
- Easy to scan and compare
Tree View
Excels at displaying complex nested documents with hierarchical structures.
- Shows expandable nodes
- Great for understanding schemas
JSON View
Provides syntax-highlighted JSON output perfect for developers and technical users.
- Formatted with highlighting
- Easy to copy for APIs
Raw View
Shows unformatted JSON output in a compact display, optimized for performance.
- Optimized for large datasets
- Exact data format
Switching Between Views
The view selector is conveniently located above the results area. For power users, keyboard shortcuts make view switching even faster:
Table View Features
Column Management
- Click headers to sort data
- Drag borders to resize columns
- Drag columns to reorder
- Right-click to hide/show columns
Data Interaction
- Click rows to select
- Ctrl+click for multi-select
- Right-click to copy data
- Export selected rows
Data Formatting
The table view automatically formats your data for better readability:
- Numbers, dates, and booleans are automatically formatted
- Long text is truncated with "..." indicators
- Expandable cells allow you to see full content
- Different data types are color-coded
Working with Results
Sorting and Filtering
Sorting Data
Filtering Results
- Text search across all columns
- Regex support for advanced patterns
- Toggle case sensitivity
Pagination
Pagination controls make it easy to work with large result sets:
Result Actions
Copy and Export
Copy Options
- Copy all results
- Copy selected rows
- Copy as JSON/CSV
Export Formats
- CSV for spreadsheets
- JSON for developers
- Excel for business
Save to Favorites
Preserve queries that you'll want to use again:
- Save current query as favorite
- Add descriptive tags
- Add explanation description
- Quick access from favorites panel
Next Steps
Save Queries to Favorites
Learn how to organize frequently used queries, create tags for better organization, and build a personal library of useful queries.
Import & Export Data
Master data import and export capabilities, work with different file formats, and integrate with external tools and workflows.