I'm a beginner in Mongoose, I would like to make a change ( findOneAndUpdate
) in the second array
address in the city field, I tried everything I knew and thank no one that can help.
{
_id: "573c5ed236c156cc2351d1ea",
titulo: 'avengers',
pessoa:
[
{
_id:"573c5ed236c156cc2351d1ee",
endereco[
{
cidade: "sao paulo",
bairro: "bairro1",
_id: "573c5ed236c156cc2351d1f0"
}
]
},
{
endereco[
{
cidade: "rio de janeiro",
bairro: "bairro2",
id: "573c5ed236c156cc2351d1ef"
}
]
}
]
}