Painting Blue Code
Simple, self-explanatory code snippets.
2015-08-18
MongoDB - Array pop (remove, delete) last item of an array type of field
db.
COLLECTION_NAME
.update( {
FILTER_HERE
}, {
$pop
:{
FIELD_NAME_WITH_ARRAY
:
1
} } );
Newer Post
Older Post
Home