I have a string array like ['flat','flat shoes','shoes','black shoes'].
And mongo collection has a field called called 'KeyWords' which is a string.
I need to write a query to get the elements with 'KeyWords' containing any of the items from the string array.
Example collection
{
"KeyWords" : [
"MEN'S SMART SHOES- FIREBACK LEATHER SLIP ON SHOES TAN",
"G670",
"SMART SHOES",
"FIREBACK SHOES",
"SHOES"
]}
{
"KeyWords" : [
"MEN'S SMART SHOES- FIREBACK LEATHER SLIP ON SHOES TAN",
"G670",
"SMART SHOES",
"FIREBACK SHOES",
"SHOES"
]
}
Can anybody suggest how to achieve this.