当前位置:网站首页>How to use the mongodb ID array to get multiple documents- How to get multiple document using array of MongoDb id?
How to use the mongodb ID array to get multiple documents- How to get multiple document using array of MongoDb id?
2022-07-04 11:39:00 【javail】
problem :
I have an array of ids and I want to get all document of them at once. I have a group id, I want to get all their documents at once .For that I am writing but it return 0 records. So , I'm writing , But it returns 0 Bar record .
How can I search using multiple Ids ? How to use multiple Id To search ?
db.getCollection('feed').find({"_id" : { "$in" : [ "55880c251df42d0466919268","55bf528e69b70ae79be35006" ]}})I am able to get records by passing single id like I can pass a single id To get records
db.getCollection('feed').find({"_id":ObjectId("55880c251df42d0466919268")})Solution :
Reference resources : https://stackoom.com/en/question/2BNOj边栏推荐
- Workplace liquor bureau must pay attention to
- Analysis function in SQL
- Solaris 10 network services
- Entitas learning [iv] other common knowledge points
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 22
- Enter the smart Park, and change begins here
- OSI model notes
- VPS安装Virtualmin面板
- Function introduction of canbedded component
- 三立期货安全么?期货开户怎么开?目前期货手续费怎么降低?
猜你喜欢
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20](/img/d5/4bce239b522696b5312b1346336b5f.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20

Process communication and thread explanation

How to judge the advantages and disadvantages of low code products in the market?

2018 meisai modeling summary +latex standard meisai template sharing

QQ group collection

os. Path built-in module

Detailed explanation of classic process synchronization problems
![Entitas learning [3] multi context system](/img/f9/a3ce86ff2121dd1043305b7e834cc5.jpg)
Entitas learning [3] multi context system

Introduction to canoe automatic test system
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 10](/img/89/1c2f98973b79e8d181c10d7796fbb5.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 10
随机推荐
3W word will help you master the C language as soon as you get started - the latest update is up to 5.22
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 21
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 8
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12
Four sorts: bubble, select, insert, count
Decrypt the advantages of low code and unlock efficient application development
netstat
SQL greatest() function instance detailed example
Exceptions and exception handling
Canoe: what is vtsystem
Reptile learning 4 winter vacation series (3)
Video analysis
Introduction to canoe automatic test system
thread
Entitas learning [iv] other common knowledge points
Dos and path
Day01 preliminary packet capture
Canoe: distinguish VT, VN and vteststudio from their development history
Solaris 10网络服务
Function introduction of canbedded component