mongooseでdocumentsを全てupdateする方法


商品データを一括で変更する

          Product.updateMany(
            { id: req.body.id },
            { $set: 
              { 
                name: ProductName,
              } 
            },
            function(err) {
              if (err) throw err;
            }
          );