Appsmith
Github
Discord
Appsmith Cloud
Community Forum
Search…
v1.3
Introduction
Setup Appsmith
Tutorials
Sample Apps
Templates
How To Guides
Debugging Errors
FAQs
Telemetry
Security
Core Concepts
Connecting to Data Sources
Displaying Data (Read)
Capturing Data (Write)
Writing Code
Designing an Application
Building Dynamic UI
Access Control
Version Control with Git
JSON Web Tokens (JWT)
Datasource Reference
Amazon / Generic S3
ArangoDB
DynamoDB
Elasticsearch
Firestore
Google Sheets
MongoDB
Mongo Query Syntax
Whitelist MongoDB Cloud
MS SQL
MySQL
PostgreSQL
Redis
Redshift
Snowflake
SMTP
Framework Reference
Appsmith Context Object
Query
Show Modal
Close Modal
Download
Intervals (Time events)
Show Alert
Navigate To
Store Value
Copy To Clipboard
Reset Widget
JavaScript Editor (Beta)
Widget Reference
Audio
Audio Recorder
Button
Button Group
Camera
Chart
Checkbox
Checkbox Group
Container
Currency Input
Datepicker
Divider
Document Viewer
Form
Filepicker
Icon Button
Iframe
Image
Input
JSON Form
List
Maps
Map Chart
Menu Button
Modal
Multi-select
Multi-tree-select
Phone Input
Progress
Radio Group
Rating
Rich Text Editor
Select
Stat Box
Switch
Switch Group
Tabs
Table
Text
Tree-select
Video
Powered By
GitBook
Mongo Query Syntax
Appsmith uses the database command syntax to query MongoDB
Find Query
Syntax
1
{
2
"find": <string>,
3
"filter": <document>,
4
"sort": <document>,
5
"projection": <document>,
6
"skip": <int>,
7
"limit": <int>
8
}
Copied!
​
Complete list of fields
​
Example
1
{
2
"find": "restaurants",
3
"filter": { "rating": { "$gte": 9 }, "cuisine": "italian" },
4
"projection": { "name": 1, "rating": 1, "address": 1 },
5
"sort": { "name": 1 },
6
"limit": 5
7
}
Copied!
Update Query
Syntax
1
{
2
"update": <collection>,
3
"updates": [
4
{
5
"q": <query>,
6
"u": <document or pipeline>
7
}
8
]
9
}
Copied!
​
Complete list of fields
​
Example
1
{
2
"update": "members",
3
"updates": [
4
{
5
"q": { },
6
"u": { "$set": { "status": "A" }, "$inc": { "points": 1 } },
7
"multi": true
8
}
9
]
10
}
Copied!
Insert Query
Syntax
1
{
2
"insert": <collection>,
3
"documents": [ <document>, <document>, ... ],
4
"ordered": <boolean>
5
}
Copied!
​
Complete list of fields
​
Example
1
{
2
"insert": "users",
3
"documents": [
4
{ "_id": 1, "user": "abc123", status: "A" }
5
]
6
}
Copied!
Delete Query
Syntax
1
{
2
"delete": <collection>,
3
"deletes": [
4
{
5
"q" : <query>,
6
"limit" : <integer>
7
}
8
]
9
}
Copied!
​
Complete list of fields
​
Example
1
{
2
"delete": "orders",
3
"deletes": [ {
4
"q": { status: "D" },
5
"limit": 1
6
} ]
7
}
Copied!
Execute Queries
Datasource Reference - Previous
MongoDB
Next
Whitelist MongoDB Cloud
Last modified
1mo ago
Copy link
Edit on GitHub
Contents
Find Query
Syntax
Complete list of fields
Example
Update Query
Syntax
Complete list of fields
Example
Insert Query
Syntax
Complete list of fields
Example
Delete Query
Syntax
Complete list of fields
Example