I have this document:
[{
_id: "5a9eff23b9eea111a00016c8",
participants: [
2,
3
]
}]
I would like to know if it's possible to add and format fields on array result, something like this.
{
_id: "5a9eff23b9eea111a00016c8",
participants: [
{
_id: 2,
order: 22,
},
{
_id: 3,
order: 22,
}
]
}
This should not be saved in the database, it should be only attached on response.
If it's possible, I would like an advice.
@rollstuhlfahrer Well , i don't think so , these fields ( order , _id) , doesn't exists in other table , they are custom