Answer the question
In order to leave comments, you need to log in
How to update data in mongoose array?
There is an object:
{
id: 8946,
e: [
...,
{type: 'model', value: 1, other: {
price: 1525,
chtoto: 1,
}}
]
}
//достаю из бд
findOne({id: 8946})
Но мне допустим надо достать из массива e обьект где type === 'model' && value === 1
и изменить данные в обьекте other
Как это сделать?)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question