difference between ($in) and just (in) mongoose?

Viewed 24

What is the difference between ($in) and just (in) mongoose? Why we use $ Sign. Sometimes I see $in and sometimes just in query. Thanks

1 Answers

in functionality there is no difference. we use $ sign because if we don't write it, mongodb consider it as a string. By the way according to mongodb documentation the $ sign reserved for operators.

Related