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

139
Vistas
how to search array elements in mongodb against fields

I have any array coming from user wit ingredients in it. I have two collection name one is recipe collection where i stored recipes with ingredients name. so I am able to search that array in recipe collection. But I have another collection name Nutrition where I have nutrition food or you can say ingredient so I have to search name of the ingredient from the nutrition collection which are same a coming req array. like my coming array is ['salmon','fish','almonds'] so I have to search there array elements in mu nutrition collection and my nutrition collection is like

{"name":"Egg","protein:6,"carbs":8,"calorie":72}

so I have to compare array elements with name fields

enter image description here

about 4 years ago · Juan Pablo Isaza
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