MongoDB Push to index
await Model.findByIdAndUpdate(id, {
$push: {
'<array-name>': {
$each: [],
$position: 0
}
}
})
florinrelea
await Model.findByIdAndUpdate(id, {
$push: {
'<array-name>': {
$each: [],
$position: 0
}
}
})