Hello,
I have lots of records in a collection. Each one of these records contains an email address. Now I would like to extract the domain part of an email address and save it in a new field called domain. (for each record) How can I do that?
I tried this code, but received the error: MongoServerError: $arrayElemAt’s first argument must be an array, but is object
It sould update the domain field with the regexed value of the field, right??
Unfortunately,. I get the following error:
Error: clone(t={}){const r=t.loc||{};return e({loc:new Position("line"in r?r.line:this.loc.line,"column"in r?r.column:……)} could not be cloned. at Object.serialize (node:v8:371:7)