Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Select Query in mongo db in c# using json query
WhatsApp
Shirsendu Nandi
13y
11.1
k
0
0
25
Blog
See MongoDB offers a rich query environment with lots of features.
Queries in MongoDB are represented as JSON-style objects, very much like the documents we actually store in the database.
See the below example
Like sqlserver we have select * from things where x=3 and y=
"foo"
In mongo query we have to write
db.things.find( { x : 3, y :
"foo"
} );
NOw to find all document where j is not equal to 3 and k is greater than 10, you'd query like so:
db.things.find({j: {$ne: 3}, k: {$gt: 10} });
Up Next
Get Column Name Of The Selected Cell In Kendo Grid Using jQuery
Ebook Download
View all
Frontend Developer Interview Questions and Answers
Read by 940 people
Download Now!
Learn
View all
Membership not found