My documents in the orders collection has _client key, which is an ObjectId references to another entity in another collection. The collection could be organization and could be users - I mean - it's variable collection. I want to tell Mongo to l...
I have two collection  Collection_foo :  {     cid:'1234',     'foo':'bar',     some 10+ fields... }   Collection_bar :  {     cid:'1234',     'foobar':'barfoo',     some 10+ fields... }   I want to joi...
I have some problem with aggregate, I have one collection.I have collection like code below. so on I have one field call dueDate compare with current Date 2018-11-16. I need sum remaining value by compare that current date with dueDate totalfirstAmou...
I'm struggling to find out how to add a new status field in an aggregate based on a calculation of an array of items.  Currently, I do this in Angular front-end by asking both collections and iterating each element with the _.some() method of Lod...
I am stucked in one aggregate query, Following is my data  Let database = [ {  _id: 'fefesf', name: 'John', info: {date: ISODate(), marks: '12'} }, {  _id: 'uiuioo', name: 'John', info: {date: ISODate(), marks:...
I'm using node-mongodb-native to implement MongoDB query functions. I need to perform a query if tag matches a part or combined firstName and lastName like this:  filter50WithTagSkip(tag, skip) {         return new Promise((resolve, reject) =>...
In my project I would like to calculate monthly precipitation and temperature averages (min/max) for the whole year, similarly to this chart or average views in this app (which is using Forecast.io data).  I have stumbled quite early, however, as I a...
I have to create a tree structured table with some data given in the form of json array.  let us take an example array  array : [ { "continent": "Asia", "country":"India", "population": 100, "GDP":4}, {...
wanted to create a table just like this    (ignore the styling). i got confuse how to formate the data to make this table in html.  $scope.toddlers = [ {   "name": "a",   "day": 1,   "total": 3 }, {   "name": &...
I have "Offers" and "Requests" collections, I need to get all offers that user made, group them by requests and find the lowest "Offer.price" on each request, each offer has requestId field. I am using aggregate to solve this,...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.