Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

314
Vistas
How to perform a "NOT IN" query in mongodb without using $nin?

I need an alternative to $nin in mongodb. As we know, we can achieve the "IN" query operation by performing "OR" query as well.

In the same way, how can I achieve "NOT IN" functionality in mongodb without using $nin ? What are the alternatives to using $nin in mongodb to acheive exactly same results ?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Well, interesting, But I think It can be achieved by $not

say you have $nin for A,B and C where A,B, C are values which you want to ignore

so instead of calling $nin : [ABC]

what if we call $not : {$or : [A,B,C]}

Update :

Since $not is not working with $or. Maybe you can try $nor which I hope is basically same concept.

over 4 years ago · Santiago Trujillo Denunciar

0

I found that there is a operator $nor which exactly does this function. It works as the negation of $or.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda