Похожие чаты

Hello I have a collection in mongoDB and it has some

fields such as IDuser , IDMusic and ...

when I find a collection records with mongoose I want to add field to all of found docuemnts
and fill this field with true for specified IDuser for example

How can I do it ?

1 ответов

2 просмотра

var yourNewResult = yourResult.map(x => yourCondition ? x["yourField"] = true : x["yourField"] = false );

Похожие вопросы

Карта сайта