Push items into mongo array via mongoose
Assuming, var friend = { firstName: ‘Harry’, lastName: ‘Potter’ }; There are two options you have: Update the model in-memory, and save (plain javascript array.push): or I always try and go for the first option when possible, because it’ll respect more of the benefits that mongoose gives you (hooks, validation, etc.). However, if you are doing … Read more