I need to create a query that searches within an array for occurrences of values that pass through an array.
It does not need to be an exact query, but it can bring me the occurrences
This is a part of my model
var OrdersCompaniesSchema = new Schema({
target_studies: String,
target_grade: String,
interests : [String], // Contains for example ["Works","Sciences","Economy"]
stock: Number
})
I tried the query like this
db.orderscompanies.find({"interests": { "$in": ["Works","Banks","Sports"] }})
But this query response me a blank array [] because this find the exactly values, and I dont need this. I need find any one ocurrence according the array with which I am consulting
Any help? Thanks!