1

example I got

db.collection.update({}, {$rename: {'XUknown': 'XString'}}, false, true);

I tried in nodejs.

await PRODUCT.update(
    {},
    { $rename: { "product_code": "group_code" } }, false, true
  )
    .then((data) => {
      return res.status(200).json(data)
    })
    .catch((error) => {
      res.status(400).json({ error: error, message: 'not possible' })
    })

response I got ..it not updating

{
    "acknowledged": false
}
Habeeb
  • 178
  • 8

0 Answers0