Missing property at client side Nodejs
The problem is that item
is a MongooseDocument, not a plain javascript object.
There are multiple ways to achieve what you want.
1) Using .lean()
Documents returned from queries with the lean option enabled are plain javascript objects, not MongooseDocuments
Model.findOne().lean().exec((err, item) => { item.mention = [{ id: 1 }]; res.json(item);});
This option will increase the performance since you ignore the overhead of creating the Mongoose Document
2) Using: .set()
item.set('mention', [{ id: 1}], { strict: false });
4) Using spread operator
res.json({ status: 1, message: 'success', data: { mention: [{ id: 5 }], ...item }})
4) Using Object.assign
as @Alexis Facques explained.