User collection below
[
{
"_id" : ObjectId("59a6b381c13a090c70fc21b6"),
"Name":"ABC"
"processNumber" : "FEE 082517",
"Process":"abc,cde"
},
{
"_id" : ObjectId("59a6b381c13a090c70fc21b6"),
"Name":"ABC"
"processNumber" : "FEE 082517",
"Process":"efg"
},
{
"_id" : ObjectId("59a6b381c13a090c70fc21b6"),
"Name":"ABC"
"processNumber" : "FEE 082517",
"Process":"123,3de"
}
]
I have a user collection. I have to prepare a query to check the Process field whether it has any comma in value if it's there we have to return those documents
Expected output :
[
{
"_id" : ObjectId("59a6b381c13a090c70fc21b6"),
"Name":"ABC"
"processNumber" : "FEE 082517",
"Process":"abc,cde"
},
{
"_id" : ObjectId("59a6b381c13a090c70fc21b6"),
"Name":"ABC"
"processNumber" : "FEE 082517",
"Process":"123,3de"
}
]