db.RetailerRequest.updateMany
(
{"fulfill.tagSerialNumbers":{$type:"string"}},
[
{$set:
{fulfill:
{$map:
{input:"$fulfill",
in:{$mergeObjects:
["$this",{tagSerialNumbers:
{ $toLong: "$$this"}}]}}}
}
}
]
)
Now i am getting the error: MongoServerError: Unsupported conversion from object to long in $convert with no onError value
Please let me know how to proceed further