skip to Main Content

Group MongoDB documents by field

I have a collection of say questions like below - { question: "what's the question?", answer: "some answer", points: 10 }, { question: "what's the question again?", answer: "some answer again", points: 40 }, ... The questions which are answered…

VIEW QUESTION

MongoDB aggregate to get stats

I've done this sometime last year, but now I really can't recall and can't find any helpful resources. I want to get the statistics of my collection based on types. This is my data object { "_id": { "$oid": "63bfc374378c59a5328f229e"…

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