We have a requirement to insert to the sub array when sub array contains some value, but I get an error when using push with arrayFilter: fail to run update: w
I can use the following for exact matches on loosely typed data in MongoDB: var mongoClient = new MongoClient(con); IMongoDatabase mongoDatabase = mongoClient.G
I have data and need to group by two fields and in response display unique filed along with the count on this field. Sample data: [ { "categoryCode":"c
I have working on my final year college project On MERN stack. my problem is mentioned bellow please help me. const Organization = mongoose.Schema({ name: {
I have a set of circles, defined by points (centers) and a varying radius around it (green, black). I want to query if a given point (red) is contained any of t
I am using MongoDB\Driver\Manager my query is shown below. $globalSearchValue = 'Test'; $mongo = new MongoDB\Driver\Manager("mongodb://localhost:27017"); $b
I'm trying to send query to my Mongo database depending on a variable producted in my R code. Unfortunately, Mongo query needs double quotes and the function "p
If Youtube uses MongoDB as their database, then how would they store the who liked which videos information? Option 1: Store it in the Videos collection with a
My collection has array "name" with objects inside. I need to remove only those objects inside array where "name.x" is blank. "name": [ { "name.x": [
C:\project\server-assign-11\node_modules\bson\lib\error.js:41 var _this = _super.call(this, message) || this; ^ BSONTypeErro
I have an array of objects that look like this: { type: 'foo', value : 2, hashedIdentifier : ASDZXC, createdAt : '2022-02-27T14:17:44.860+00:00' } I would like
I am hoping someone can help me as I am new to Mongo DB or point me to a work around, I have a property within a Mongo DB document which is of type object, but
Before asking this question I read these answers, but could not find the solution: Check if coordinate is within area Geolocation - Check if a location belongs
I am learning IPFS and trying to save IPFS file info in MongoDB. After uploading, I get one hash value ex: {fileHash: CID(QmbCaWPi9tSqcnykvBUMaH2M1d5PiVPLEfPwhJ
"ProductCategory": [ { "_id": "6246e0d09b16cf549256ed75", "name": "Arduino Boards", "desc": "this is for demo purpose"
I would like to count different hu for a shipment. So I write this query but how I can count different hu group by shipment ? my query : db.eventstranslated.agg
var mongoose = require("mongoose"); const Schema = mongoose.Schema; let CryptoJS = require("crypto-js"); function encrypt(text) { try { let ciphertext =
I have a collection where I store unique uID for a user and I also have to register them manually. While registration I pass multiple IDs in an array and now I
I have a collection "Owners" and I want to return a list of "Owner" matching a filter (any filter), plus the count of "Pet" from the "Pets" collection for that
I have a list of commentDocument collection in MongoDB where each has the following structure: { "commentName": "test comment", "outputs": { "ex