Accessing data through mongo.db.recipes.find dosnt work

Hi all,

Hope someone can help me. Im tring to access my recipes collection through mongo.db.recipes.find() but dosnt show anything on the website. I already accessing different collection on my code which is mongo.db.category.find() and this works fine. Wonder what am i doing wrong as one code works fine and second dosnt.

Hello @Piotr_Bieszczad, Welcome,

If other collections find query works then possibly the spelling mistake, I would suggest you compare it with the actual collection name in your database, also make sure to check the plural s character in your collection.

If it is not resolving then you need to share more details.

1 Like

Hey @Piotr_Bieszczad - welcome to the community forums!

I think @turivishal is probably right here. I can’t see anything obviously wrong with the code you’ve shared.

When you’ve got that working, if you can’t see the recipe’s ingredients, it may be because your template spells it “ingridiends”. Just mentioning, as I spotted the spelling mistake and worried it might cause problems later.

1 Like