I am new at mongodb. this is my field into my collection at mongodb.
"BusinessCode" : "13-8-113944-15-1-0-0",
"ProcessId" : UUID("122b8301-d1d9-431c-a411-142cc169c8eb"),
"WorkItemId" : NumberLong(376935),
"WKT" : ""
I want split BusinessCode and put the first number into new field.for example I want split 13
and put it into other field called Domain
.
"Domain" : "13"
according this link, seems I have to use update
but I don't know who to write <query>
for my scenario.
thanks for helping.