A
A
Alexander2021-05-16 22:38:22
MongoDB
Alexander, 2021-05-16 22:38:22

How to find an element in an array in mongoose?

How can I find element by id in likes array using mongoose?

const isLike = await TweetModel.find({
          likes: tweetId,
        })


60a1748235e7d357859355.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2021-05-16
@yarkov

I copied the title of the question and pasted it into the Google search box. Guess what was found? Correctly! 100500 answers to the question, straight from the first link start.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question