Mongodb – Mongo query filter by nested id
Hi guys I am starting to use MongoDB with NodeJS. I am not able to generate a query and I really took a look into the documentation and I could not find the answer to my question. I have a…
Hi guys I am starting to use MongoDB with NodeJS. I am not able to generate a query and I really took a look into the documentation and I could not find the answer to my question. I have a…
sorry but i'm just really bad at aggregate. Sample 4 JSONs which represent playerMovements in a game, for two different userIds are below. I need to get their latest movement in the game based on the userId. You can see…
I have a collection people. It has an array field numbers, where each document has a varying number of elements in said array. My goal is to keep the elements in the 0th index and recursively remove the rest. How…
Is there a way to boost score for exact match in Atlas search? I'm having issues getting the right/best translation for 'hi' from English to French. After some debugging I discovered that the first three(3) documents returned from my aggregation…
i need to join two documents where in the first there a property as array of _ids and in the second documents to join db={ "tipo_pratica": [ { "_id": "618981a4c1b8b3bc67ff80b6", "descrizione": "anticipata", "modulo": [ "628015cd2fd9dfee86ac6820", "62801a4c2fd9dfee86ac6821", "6278f8d9d4aa4f4cef1a8266" ]}, { "_id":…
This is my first Next JS - MongoDB Project, so everything works fine on my localhost. After I deployed my website on Vercel, I got 500: Internal Server Error on several routes (I think it's only the ones that have…
I was trying run a conditional group and push. I don’t know if it is possible with MongoDb aggregate or with NodeJs. I have attendance collection and shifts collection like below. And also created Playground for my current try Mongo…
I am using typegoose and my Query and QueryRule models are as below. export class Query { @prop() queryRule: Ref<QueryRule>; } export class QueryRule { @prop() condition: Condition; @prop() rules: Ref<QueryRule | ChildRule>[]; } I am using the following query…
After I set up prometheus with mongodb_exporter I didn't get any data in grafana , and the localhost:9216/metrics doesn't show any mongodb metrics except "mongodb_up" but for me i need all mongodb metrics in order to do the monitoring .…
I'm creating a simple application using MEAN stack. My code is working fine but i want to remove one key from the response. Please look at my ocde. models/user.js const mongoose = require('mongoose'); const Schema = mongoose.Schema; const userSchema =…