Linked Questions

66 votes
3 answers
54k views

I have below document in MongoDB(2.4.5) { "_id" : 235399, "casts" : { "crew" : [ { "_id" : 1186343, "withBase" : true, "...
Maria's user avatar
  • 1,219
27 votes
2 answers
61k views

I have a collection with objects like this { "_id" : ObjectId("5742be02289512cf98bf63e3"), "name" : "test1", "attributes" : [ { ...
Gor's user avatar
  • 2,908
8 votes
4 answers
25k views

I recently started using MongoDB and I have a question regarding updating arrays in a document. I got structure like this: { "_id" : ObjectId(), "post" : "", "comments" : [ { "...
Viktor Kirilov's user avatar
3 votes
4 answers
9k views

I have a document like following in my stocks collection in mongodb. { _id: 'xRMuRBhqRLgASyQyW', History: [ { orderId: '12032017001877', status: 'COMPLETED', }, { ...
Mritunjay Upadhyay's user avatar
3 votes
1 answer
10k views

I have an mongodb document like: { "name" : "JohnDoe", "adds" : [ { "status" : "PENDING", "date" : "2015-09-23" }, { "status" : "...
Manish Gupta's user avatar
  • 4,676
1 vote
3 answers
5k views

I'm starting with mongoDB and I want to update a nested array in my documents to add some initial value, but I can't find a way to do it with mong. here is my document : { "_id":"cTZDL7WThChSvsvBT", ...
Etienne's user avatar
  • 31
4 votes
1 answer
5k views

I've asked a question couple of days ago about updating arrays in nested arrays of objects. Right now MongoDB 3.6 officially supports it via arrayFilters feature. Is it implemented in Mongoose 5.x.x? ...
websanya's user avatar
  • 171
1 vote
1 answer
3k views

The title is a little bit hard to understand the first time, so here is an example. I use mongodb and have data like this : id: String timestamp: String steps: [{ action: 1, timestamp: String }, {...
Antek's user avatar
  • 1,267
1 vote
1 answer
3k views

Can I update all the subdocuments in array matching my update query? Here is example of collection elements: { x: 1, myarray: [ { a: 1, b: 2, }, ...
Edgar's user avatar
  • 1,353
4 votes
1 answer
795 views

Suppose I have the following document { _id: ObjectId("5234cc89687ea597eabee675"), code: "xyz", tags: [ "school", "book", "bag", "headphone", "appliance" ], qty: [ { size: "S", ...
Sanjit Roy's user avatar
1 vote
1 answer
2k views

I want to update chargeList isDelete property to true when date is greater than a specific value. my schema as follows. { "chargeList": [ { "date": ISODate("2013-06-26T18:57:30.012Z"...
Manoj Sanjeewa's user avatar
0 votes
1 answer
1k views

Mongo Playground Simple Schema: [ { "key": 1, "Array": [ { "Prop1": 1, "Prop2": 2 }, { "Prop1": 2, ...
2Fast4YouBR's user avatar
  • 1,042
0 votes
1 answer
2k views

Given the following: { "_id" : 1, "name" : "Nature", "area": [ { "place": "Some place", "discoveredBy": "" }, { "place": "Some ...
C0d3 0n3's user avatar
0 votes
1 answer
1k views

Hi i am new in nodejs i need to update a value in nested array using _id of document my database document is look like this.. "complaints" : [ { "complaint" : "head light is not working"...
Manish chauhan's user avatar
0 votes
2 answers
607 views

I have a table with data like { _id: .... Name ... "RoomStatusDetails": [ { "StatusEntryId": ObjectId("5bd6ea81d2ccda0a780054da"), "RoomId": "78163a07-76db-83c1-5c22-0749fab73251", "...
Nida Amin's user avatar
  • 755

15 30 50 per page
1
2 3 4 5
10