MongoDb Object Array Update Operation?

  mongodb, question

The document structure is as follows

 name: 4,
 list: [{
 id: "a",
 date: 1504195200000,
 other: "c"
 id: "b",
 date: 1504195200000,
 other: "c"

Matchingname,list[id]list[date]To update only matcheslistOtherwise, create a document and add new values to thelistIn the array

Unfortunately, there is no way to do it yet.upsertAn array element.This problem on StackoverflowWe discussed the same situation as you. Although it is aimed at 2.2, the problem is still the same.