I have the following scheme on my MongoDB
{
"weekday": 0,
"hour":[
{
"hour": 14,
"user": "user",
"promoted": ["user1","user2","user3","user4"]
},
{
"hour": 15,
"user": "user",
"promoted": ["user1","user2","user3","user4"]
},
]
}
I want to add single elements to the "promoted" array of a certain hour, for example, add "user5" to the "promoted" array of the sub-document which has "hour": 14.
I have learned how to add new sub-documents to the hour array but not how to add a single element to the "promoted" array of a already existing sub-document. How could I do that?