Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>
The article is from my blog: https://www.lwxshow.com/db/mongo/detection-field-exists-in-mongodb.html
#Find the column containing post and test whether the column containing post exists
In mongodb, check whether the field exists
or not
db.cuser.find({post:{$ exists:1 }});
{ “_ id” : ObjectId(“51a23348ea214a8ee3204de1”), “age” : 1, “name” : “userid_ 1”, “post” : [ 1, 2, 3, 4, 5 ], “pwd” : “pwd_ 1” }
Similar Posts:
- Net start mongodb error: invalid service name
- mongodb not authorized on admin to execute command [version 3.2.18]
- Mongodb Cannot Start: child process failed, exited with error number 100
- Mongodb access control is not enabled for the database
- MongoDB:Unclean shutdown detected
- mongodb:E QUERY [thread1] SyntaxError: missing ; before statement @(shell):1:4
- [Solved] Mongodb Error: NETWORK [thread1] Failed to connect to 127.0.0.1:27017
- Unable to start mongod after installing mongodb in Ubuntu
- No package mongodb-org available. [How to Solve]
- [Solved] MongoDB Start ERROR: child process failed, exited with error number