skip to Main Content

MongoDB Aggregation – Fetch data from ObjectId subarray

I have these collections: author [ { _id: "63c242130b17d5516e0cb499", author_name:'Vyom', book_ids:["63c242330b17d5516e0cb49a","63c242410b17d5516e0cb49b"] } ] book [ { _id:"63c242330b17d5516e0cb49a", author_id:'63c242130b17d5516e0cb499', book_name:'True Love', genere:'horror' }, { _id:"63c242410b17d5516e0cb49b", author_id:'63c242130b17d5516e0cb499', book_name:'Monster Strike', genere:'romance' }, ] I want to fetch details of books in author collection…

VIEW QUESTION

Mongodb – Create an object to already existing collection

I have a collection "product_reviews" with this document structure { _id: 'B000000OE4', 'product/title': 'Working Class Hero', 'product/price': '16.99', reviews: [ { 'review/userId': 'unknown', 'review/profileName': 'unknown', 'review/helpfulness': '2/3', 'review/score': '4.0', 'review/time': '27/05/1999/00:00:00', 'review/summary': 'Worth it for one song', 'review/text': "I really…

VIEW QUESTION
Back To Top
Search