Push in MongoDB Nested Data

  mongodb, question

Mongodb stores data of similar structure:


If you add content directly to the array, it is very simple, just use the $push operator.
But if I want to push several strings into sub_array with sub_id 2, how should I locate them?

I can’t.

Must firstfind, according to the query results to locatesub_idWhich is the array (assuming that the label in the title is 1), the last update{"array.1.sub_array": {$push: "text24"}}.