Painting Blue Code
Simple, self-explanatory code snippets.
2015-08-18
MongoDB - Set the value of a specific item (item number 2) within an array-type of field
db.COLLECTION_NAME.update( {
FILTER_HERE
}, {
$set
:{
"
FIELD_NAME_WITH_ARRAY
.
ARRAY_INDEX_HERE
"
:
VALUE_HERE
} } );
Newer Post
Older Post
Home