Christopher Herold
Posts: 0
Joined: Fri Jun 28, 2013 8:27 pm

Case Insensitive DB Query

I am trying to create a query that is case insensitive.

My original query is

"where": '{"username":"' + username + '"}'

How do I make this case insensitive??

I tried

"where": '{"username":{ $regex: /+ username +/i } }'

with no success.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Case Insensitive DB Query

Hi Christopher,

Parameter 'where' should have this format:pre{"username":{"$regex":"username", "$options":"i"}}/pre
Find more here: https://getsatisfaction.com/apperyio/...

Return to “Issues”