How can i use "like" in nosql windows? i used examples in the link belove. it does not work. i get json syntax error. i tried {log: { $regex: /rebuild/ } } and {log: /rebuild/ }
For a query like this in the NoSQL Explorer, try this:
{"log": {'$regex': "rebuild"}}
Let me know if this works for you.
-Pádraig
Customer Support
said
almost 6 years ago
Answer
Hi all,
Just a quick amendment to Padraigs answer as it will not work in the new portal due to a more strict parser.
The quotations around $regex should in fact be double quotes rather than single. Like so :
{"log": {"$regex": "rebuild"}}
Best Regards, Patrick.
1 person likes this
W
Walt Collins
said
almost 6 years ago
In my recent testing in the NoSQL explorer, the above answer failed. The solution is to use double quotes instead of single quotes around the word "$regex". So, a working example would be:
Ufuk Coban
How can i use "like" in nosql windows? i used examples in the link belove. it does not work. i get json syntax error. i tried {log: { $regex: /rebuild/ } } and {log: /rebuild/ }
https://chartio.com/resources/tutorials/how-to-use-a-sql-like-statement-in-mongodb
Hi all,
Just a quick amendment to Padraigs answer as it will not work in the new portal due to a more strict parser.
The quotations around $regex should in fact be double quotes rather than single. Like so :
{"log": {"$regex": "rebuild"}}
Best Regards, Patrick.
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi Ufuk,
For a query like this in the NoSQL Explorer, try this:
{"log": {'$regex': "rebuild"}}
Let me know if this works for you.
-Pádraig
Customer Support
Hi all,
Just a quick amendment to Padraigs answer as it will not work in the new portal due to a more strict parser.
The quotations around $regex should in fact be double quotes rather than single. Like so :
{"log": {"$regex": "rebuild"}}
Best Regards, Patrick.
1 person likes this
Walt Collins
In my recent testing in the NoSQL explorer, the above answer failed. The solution is to use double quotes instead of single quotes around the word "$regex". So, a working example would be:
{"log": {"$regex": "rebuild"}}
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics