Okay, assuming you know the index of the answer you want to modify in the answers array, you can use question.answers.index.up to update it. If you don’t know the index now, you can use $ to place it, and use {answers._id for Filter. :123456} update using {answers.$.up:321}
Note the
$
operator, we call it Positional Operator, please see the link for more information.I think you shouldn’t nest the data table so deeply. I think it’s more reasonable to build a relational table.
Okay, assuming you know the index of the answer you want to modify in the answers array, you can use question.answers.index.up to update it. If you don’t know the index now, you can use $ to place it, and use {answers._id for Filter. :123456} update using {answers.$.up:321}