Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!