array.forEach((item, i) => { User.updateOne( { id: item.id }, { $push: { history: { val: item.val } } }, () => {}) })
Related questions
Find more questions by tags MongooseNode.js