How to search comma separated values in MongoDB using PHP with comma separated input values?
Ex: In collection1 I am storing the values with comma separated and now I want to search that column with comma separated values:
{service_list: 'a, b, c'}
Now I want to search that field with (a,d,e).
If we store in array we can search easily but there is no chance to change the DB structure. How can I solve this issue?
db.collection1.find({"service_list": /.*a.*.d.*/})