[DOCS-7365] Comment on: "manual/tutorial/query-documents.txt" Created: 08/Mar/16  Updated: 08/Dec/16  Resolved: 08/Mar/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Allison Reinheimer Moore
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

window 7(64-bit)

Location: https://docs.mongodb.org/manual/tutorial/query-documents/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Referrer: https://docs.mongodb.org/manual/tutorial/insert-documents/
Screen Resolution: 1366 x 768
repo: docs
source: tutorial/query-documents


Participants:
Days since reply: 7 years, 49 weeks, 1 day ago

 Description   

I have a student array object. And this array object have jSON objects which contain student_id and student_name,
So my problem is that how can I add new record in array object.



 Comments   
Comment by Allison Reinheimer Moore [ 08/Mar/16 ]

MongoDB provides update operators that you can use when updating documents. To add to an array, you'd use the $push operator, there's an example on that reference page describing adding values to the array.

Generated at Thu Feb 08 07:54:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.