Syntax of $or in mongoDBMongoDB vs. CassandraHow to query MongoDB with “like”?Delete everything in a MongoDB databaseHow do I drop a MongoDB database from the command line?“Large data” work flows using pandasAggregate match query with date extraction in MongoDBMongoDB 3.2 Document Validation match “null” or “string” typeerrmsg: 'Unsupported projection option: $push: … ', code: 2, codeName: 'BadValue' }MongoDB aggregate assert: command failedmongodb aggregate $out E11000 duplicate key error index
Shorten or merge multiple lines of `&> /dev/null &`
Is it possible to remotely hack the GPS system and disable GPS service worldwide?
How did NASA Langley end up with the first 737?
On San Andreas Speedruns, why do players blow up the Picador in the mission Ryder?
What weight should be given to writers groups critiques?
Must a warlock replace spells with new spells of exactly their Pact Magic spell slot level?
Which European Languages are not Indo-European?
Is it possible to deposit stock into a Solo 401k?
My players want to grind XP but we're using landmark advancement
Non-containing subsets of two sizes
The art of clickbait captions
Why does this if statement return true
I know that there is a preselected candidate for a position to be filled at my department. What should I do?
Is it truly impossible to tell what a CPU is doing?
Determine this limit
Public transport tickets in UK for two weeks
WordPress 5.2.1 deactivated my jQuery
Why did the person in charge of a principality not just declare themself king?
Make 24 using exactly three 3s
Beginner looking to learn/master musical theory and instrumental ability. Where should I begin?
Is a Gazan woman running for Office in Belgium?
Is the Unsullied name meant to be ironic? How did it come to be?
Need to read my home electrical Meter
Does French have the English "short i" vowel?
Syntax of $or in mongoDB
MongoDB vs. CassandraHow to query MongoDB with “like”?Delete everything in a MongoDB databaseHow do I drop a MongoDB database from the command line?“Large data” work flows using pandasAggregate match query with date extraction in MongoDBMongoDB 3.2 Document Validation match “null” or “string” typeerrmsg: 'Unsupported projection option: $push: … ', code: 2, codeName: 'BadValue' }MongoDB aggregate assert: command failedmongodb aggregate $out E11000 duplicate key error index
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I tried this code bellow that I found in openclassroom but it's not working, Please help
db.getCollection('test').find(
"field" : "$or" : ["$gt" : 10, "$lt" : 5 ]
,
"field":1,"_id":0)
The result is:
Error: error:
"ok" : 0,
"errmsg" : "unknown operator: $or",
"code" : 2,
"codeName" : "BadValue"
mongodb
add a comment |
I tried this code bellow that I found in openclassroom but it's not working, Please help
db.getCollection('test').find(
"field" : "$or" : ["$gt" : 10, "$lt" : 5 ]
,
"field":1,"_id":0)
The result is:
Error: error:
"ok" : 0,
"errmsg" : "unknown operator: $or",
"code" : 2,
"codeName" : "BadValue"
mongodb
add a comment |
I tried this code bellow that I found in openclassroom but it's not working, Please help
db.getCollection('test').find(
"field" : "$or" : ["$gt" : 10, "$lt" : 5 ]
,
"field":1,"_id":0)
The result is:
Error: error:
"ok" : 0,
"errmsg" : "unknown operator: $or",
"code" : 2,
"codeName" : "BadValue"
mongodb
I tried this code bellow that I found in openclassroom but it's not working, Please help
db.getCollection('test').find(
"field" : "$or" : ["$gt" : 10, "$lt" : 5 ]
,
"field":1,"_id":0)
The result is:
Error: error:
"ok" : 0,
"errmsg" : "unknown operator: $or",
"code" : 2,
"codeName" : "BadValue"
mongodb
mongodb
asked Mar 24 at 0:50
thedev09thedev09
31
31
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You were almost right. refer here
db.getCollection('test').find(
"$or" : ["field" : "$gt" : 10, "field":"$lt" : 5 ]
},
"field":1,"_id":0)
Thank you I found the syntax in this page openclassrooms.com/en/courses/… It's an old syntax or just a mistake ?
– thedev09
Mar 24 at 1:11
Most probably a wrong syntax. But I can't access the link as I need to authorize.
– Suresh Prajapati
Mar 24 at 1:14
imgur.com/NUSHH7n
– thedev09
Mar 24 at 1:18
Yes, thank you very much
– thedev09
Mar 24 at 15:13
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55319768%2fsyntax-of-or-in-mongodb%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You were almost right. refer here
db.getCollection('test').find(
"$or" : ["field" : "$gt" : 10, "field":"$lt" : 5 ]
},
"field":1,"_id":0)
Thank you I found the syntax in this page openclassrooms.com/en/courses/… It's an old syntax or just a mistake ?
– thedev09
Mar 24 at 1:11
Most probably a wrong syntax. But I can't access the link as I need to authorize.
– Suresh Prajapati
Mar 24 at 1:14
imgur.com/NUSHH7n
– thedev09
Mar 24 at 1:18
Yes, thank you very much
– thedev09
Mar 24 at 15:13
add a comment |
You were almost right. refer here
db.getCollection('test').find(
"$or" : ["field" : "$gt" : 10, "field":"$lt" : 5 ]
},
"field":1,"_id":0)
Thank you I found the syntax in this page openclassrooms.com/en/courses/… It's an old syntax or just a mistake ?
– thedev09
Mar 24 at 1:11
Most probably a wrong syntax. But I can't access the link as I need to authorize.
– Suresh Prajapati
Mar 24 at 1:14
imgur.com/NUSHH7n
– thedev09
Mar 24 at 1:18
Yes, thank you very much
– thedev09
Mar 24 at 15:13
add a comment |
You were almost right. refer here
db.getCollection('test').find(
"$or" : ["field" : "$gt" : 10, "field":"$lt" : 5 ]
},
"field":1,"_id":0)
You were almost right. refer here
db.getCollection('test').find(
"$or" : ["field" : "$gt" : 10, "field":"$lt" : 5 ]
},
"field":1,"_id":0)
answered Mar 24 at 1:09
Suresh PrajapatiSuresh Prajapati
1,49321125
1,49321125
Thank you I found the syntax in this page openclassrooms.com/en/courses/… It's an old syntax or just a mistake ?
– thedev09
Mar 24 at 1:11
Most probably a wrong syntax. But I can't access the link as I need to authorize.
– Suresh Prajapati
Mar 24 at 1:14
imgur.com/NUSHH7n
– thedev09
Mar 24 at 1:18
Yes, thank you very much
– thedev09
Mar 24 at 15:13
add a comment |
Thank you I found the syntax in this page openclassrooms.com/en/courses/… It's an old syntax or just a mistake ?
– thedev09
Mar 24 at 1:11
Most probably a wrong syntax. But I can't access the link as I need to authorize.
– Suresh Prajapati
Mar 24 at 1:14
imgur.com/NUSHH7n
– thedev09
Mar 24 at 1:18
Yes, thank you very much
– thedev09
Mar 24 at 15:13
Thank you I found the syntax in this page openclassrooms.com/en/courses/… It's an old syntax or just a mistake ?
– thedev09
Mar 24 at 1:11
Thank you I found the syntax in this page openclassrooms.com/en/courses/… It's an old syntax or just a mistake ?
– thedev09
Mar 24 at 1:11
Most probably a wrong syntax. But I can't access the link as I need to authorize.
– Suresh Prajapati
Mar 24 at 1:14
Most probably a wrong syntax. But I can't access the link as I need to authorize.
– Suresh Prajapati
Mar 24 at 1:14
imgur.com/NUSHH7n
– thedev09
Mar 24 at 1:18
imgur.com/NUSHH7n
– thedev09
Mar 24 at 1:18
Yes, thank you very much
– thedev09
Mar 24 at 15:13
Yes, thank you very much
– thedev09
Mar 24 at 15:13
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55319768%2fsyntax-of-or-in-mongodb%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown