MongoDB Query .find() hanya mengembalikan output pertama?

hi, i want to get all nested object that match condition in mongodb find query, my query just look like this: find({ transactions: {$elemMatch: {date: { $gte: someisodate, $lte: someisodate) } } } }, { _id: 0, "transactions.$": 1 });. i get what i want, but just one object, i want to get all object that matched query. how to do that? that query doesnt return multiple result, this only return first matched result

avatar tuyllers

12 Kontribusi 2 Poin

Dipost 1 tahun yang lalu

Belum ada Jawaban. Jadi yang pertama Jawaban

Login untuk ikut Jawaban