DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
mongodb find and update array item by id
db
.
myCollection
.
update
(
{
"_id"
:
1
,
"lb.id"
:
2
}
,
{
$set
:
{
"lb.$.sc"
:
17
}
}
)
PREVIOUS
NEXT
Tagged:
#mongodb
#find
#update
#array
#item
#id
ADD COMMENT
Topic
COMMENT
Name
6+3 =
Submit