How does mongoose add data to array documents

  mongodb, question

such as
var PersonSchame = new mongoose.Schema({

name: String,
 books: [{


How to add data to books at this time?

Some basic questions:)

Do you mean to add an element to the books field of a piece of data in the database? If so, refer to the following example:

 _id: xxx // A specific piece of data was found
 }, {
 members: username
 }, (err) => {
 //callback function after //update operation