일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- MongoDB #NoSQL #CreateUser #DropUser #mongod #mognod.conf
- XSS
- self-signed
- 변태는
- 많다..
- encrypt
- 취약점
- decrypt
- 보이스피싱 #대검찰청 #명의도용 #비밀번호 #계좌번호 #공공기관 #가짜검찰청
- NUGU
- 스캠
- hash
- esbuild
- 모의해킹
- CJ대한통운 #쿠팡 #통관번호오류 #통관고유번호오류 #안주원팀장 #모건인베스트
- Craco
- Malware Sample
- 로맨스스캠
- https
- react
- shell_gpt
- speed-measure-webpack-plugin
- aes
- 사진도용
- 채팅환전사기
- ssrf
- CryptoJS
- sha256
- open redirect
- md5
- Today
- Total
annyoung
[mongodb] how to find dictionary not null 본문
{ "_id" : ObjectId("5a129bde1c6fcc3ea4d21db0"), "email" : "test@gmail.com", "name" : "test", "authType" : "google", "loc" : { "country" : "US" } }, { "_id" : ObjectId("5a129bde1c6fcc3ea4d21db0"), "email" : "test2@gmail.com", "name" : "test2", "authType" : "google", "loc" : {} }, { "_id" : ObjectId("5a129bde1c6fcc3ea4d21db0"), "email" : "test3@gmail.com", "name" : "test3", "authType" : "google", "loc" : {} }, { "_id" : ObjectId("5a129bde1c6fcc3ea4d21db0"), "email" : "test4@gmail.com", "name" : "test4", "authType" : "google", "loc" : { "country" : "US" } } |
You have to know object's dictionary key.
If you want find loc(dictionary) not null data, using next query.
db.users.find({"loc.country":{$exists:true}}) |
debug result
{ "_id" : ObjectId("5a129bde1c6fcc3ea4d21db0"), "email" : "test@gmail.com", "name" : "test", "authType" : "google", "loc" : { "country" : "US" } }, { "_id" : ObjectId("5a129bde1c6fcc3ea4d21db0"), "email" : "test4@gmail.com", "name" : "test4", "authType" : "google", "loc" : { "country" : "US" } } |
'데이터베이스' 카테고리의 다른 글
mongodb combine two queries with aggregate (0) | 2022.01.25 |
---|---|
MongoDB 유저생성 및 데이터베이스 생성 (0) | 2019.01.08 |
Install MongoDB + phpMongoDriver in Mac OSX High Sierra (0) | 2018.09.13 |
mongodb not authorized? how to create database in mongodb (0) | 2018.04.18 |