I have a mongo property (category), where I want to filter with equals. I used the following syntax:
{"category":{"$eq":"cat1"}}
(I know, it can be written like:
{"category":"cat1"}
If I use the $eq operator, the mongoClient fails with "invalid operator: $eq". But only on localhost. If I deploy the same code to a remote server, it works perfectly.
How can I make it work on localhost? It would be preferred to use the $eq operator - there are many places in the code where this is used.
Thx
Aucun commentaire:
Enregistrer un commentaire