K
K
Katya Fenchenko2020-10-15 21:48:33
MongoDB
Katya Fenchenko, 2020-10-15 21:48:33

How to use mongoose to filter out null values ​​in an array nested in a table?

There is a table with fields id, name, company, participants, where participants is an array of id, where null values ​​occur. How to filter them out?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max, 2020-10-15
@7workers

{ "participants": { $elemMatch: {$ne: null }}}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question