You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to construct this query with the operator available in the documentation https://loopback.io/doc/en/lb4/Where-filter.html but could not find an answer. There are operators called inq and nin but they not supported with array of elements.
Is there a way to do it in LB4. This is one of the most widely used operations in MongoDB and I might have missed it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Let's say that we have an array looks like as follows
I want to find out all the documents where 'element1' is present in myArray.
If we run it in MongoDB it looks like
db.myCollection.find( { myArray: { $in: ['element1'] } } )
According to https://docs.mongodb.com/manual/reference/operator/query/in/.
I was trying to construct this query with the operator available in the documentation https://loopback.io/doc/en/lb4/Where-filter.html but could not find an answer. There are operators called
inq
andnin
but they not supported with array of elements.Is there a way to do it in LB4. This is one of the most widely used operations in MongoDB and I might have missed it.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions