0

I am unable to update my document when I run db.xx.updateOne({_id: ObjectId(""}, {$set: {lq: uq}) I get the error uncaught exception: ReferenceError: uq is not defined

uq field exists and contains integers, not sure why it don't work. Please help.

Lucilfer
  • 25
  • 6

1 Answers1

1
db.collection.update({
  "_id": ObjectId("5a934e000102030405000000")
},
[
  {
    "$set": {
      "field1": "$field2"
    }
  }
])

mongoplayground

YuTing
  • 5,960
  • 2
  • 3
  • 16