Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
In MongoDB how do you use $set to update a nested value in MongoDB?
Home
MongoDB
In MongoDB how do you use $set to update a nested value in MongoDB?
+1
vote
asked
Jun 3, 2020
in
MongoDB
by
Robindeniel
In MongoDB how do you use $set to update a nested value in MongoDB?
#mongodb-nested-value
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jun 3, 2020
by
SakshiSharma
In MongoDB how do you use $set to update a nested value in MongoDB?
Using the dot notation:
db.people.update({ }, { $set: { “address.street”: “Main Street” } })
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
0
votes
Q: How to $set sub-sub-array items in MongoDB
asked
Jun 3, 2020
in
MongoDB
by
Robindeniel
#mongodb-sub-array
0
votes
Q: How update the _id of one MongoDB Document in MongoDB?
asked
Jun 3, 2020
in
MongoDB
by
Robindeniel
#mongodb-update
0
votes
Q: What does an appropriate db.ClockTime.update() statement look like to convert these text based values to a date datatype in MongoDB?
asked
Jun 3, 2020
in
MongoDB
by
Robindeniel
#mongodb-clocktime-update
0
votes
Q: Which statement MongoDB query is equivalent to the following SQL query: UPDATE users SET status = "C" WHERE age > 25
asked
Jun 17, 2020
in
MongoDB
by
AdilsonLima
#mangodb
0
votes
Q: Can we use nested update panel in Ajax?
asked
Jan 30
in
AJAX
by
rajeshsharma
nested-update-panel
0
votes
Q: What are some GUIs to use with Mongo, and what features do they offer in MongoDB? I’m looking for facts here, not opinions on which interface is best.
asked
Jun 3, 2020
in
MongoDB
by
Robindeniel
#mongodb-gui
0
votes
Q: Updating a specific key/value inside of an array field with MongoDB
asked
Jun 3, 2020
in
MongoDB
by
Robindeniel
#mongodb-array-field
+1
vote
Q: How to use MongoDB in Windows?
asked
Aug 20, 2022
in
MongoDB
by
Robin
mongodb
windows
0
votes
Q: How to use map/reduce to handle more than 10000 unique keys for grouping in MongoDB?
asked
Jun 3, 2020
in
MongoDB
by
Robindeniel
#mongodb-map-reduce
0
votes
Q: How to do Journaling in MongoDB?
asked
Jan 6, 2023
in
MongoDB
by
sharadyadav1986
journaling
...