how to query an array of values using the $ne
query in mongodb?
this is the list i would like to query
const movies = [
{
name: 'crystal',
showWatched: 'cars',
number: 1,
},
{
name: 'barbra',
showWatched: 'moonlight',
number: 2,
},
{
name: 'marry',
showWatched: 'sunshine',
number: 3,
},
{
name: 'joy',
showWatched: 'cooking',
number: 4,
},
]
this below is the query i tried, i would like to get back everything not equal "crystal","marry"
but instead this query below is returning everything
const findin = ["crystal","marry"]
db.getCollection('movies').find({name: {$ne: findin} })