I have collection as: col1
{"_id":"5c3ea35651166f3refsfd5",
"environment": "production",
"application": ['cloud', 'android', 'finance']},
{"_id":"5c3ea35651166f3refsfd6",
"environment": "production",
"application": ['banking', 'network', 'finance']}
I want to project the data only if the application/s in collection matches with the application in the list of ['cloud', 'database', 'booking']. In this case, I should be able to get only first document as it has 'cloud' in both document as well as in list.
I need to use aggregation. But I am not getting correct direction..