I am doing this query to find the book with id “345” and which has a string “jack” in its owner array.
But it only lookes for the owner part and doesnt query id. Am i doing a syntax mistake?
Book.findOne({owner:{$in:["jack"]} },{_id:"345"},function(err,data)
Both the
ownerand_idproperties of the find selector need to be in the same object: