[DOCS-9727] Comment on: "manual/tutorial/query-documents.txt" Created: 05/Jan/17  Updated: 27/Oct/23  Resolved: 06/Jan/17

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

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

Location: https://docs.mongodb.com/v3.2/tutorial/query-documents/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 UBrowser/5.6.12860.7 Safari/537.36
Referrer: https://www.google.co.in/
Screen Resolution: 1366 x 768


Participants:
Days since reply: 7 years, 5 weeks, 5 days ago

 Description   

How can i increment value of array element by 1 with the help of $inc key word
example :

"points" : [

{ "points" : 85.0, "bonus" : 20.0 }

,

{ "points" : 85.0, "bonus" : 10.0 }

incremet bonus by 1..



 Comments   
Comment by Allison Reinheimer Moore [ 06/Jan/17 ]

Hello,

I'd suggest you consult the Update Documents and $inc documentation. The $inc page in particular should help you with your use case.

That said, Documentation Jira project is reserved for issues related to the docs. If you have questions about using MongoDB, I'd suggest posting to our mongodb-user Google Group.

Cheers,
Allison

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