Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

136
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda