I have a collection of ORDERS which is like:
_id:5f8e7d8084378609b2dca93f
user_id:"5f8465a777b1814c588521e2"
price:96
city:"Mumbai City"
totalCost:96
_id:5f8e7d8084378609b2dca93f
user_id:"5f8465a777b1814c588521e2"
price:96
city:"Delhi"
totalCost:96
Then in my API I receive data which is in form of array:
driverCity = ['Mumbai', 'Ahmednagar', 'Yavatmal', 'Warud', 'Umred']
Now how do I query my ORDERS collection and then check that ORDER.city is present as a substring is my driverCity variable by regex ? it means that if a substring like "mumbai" is present in ORDER.city and also in this array I want that result.