The field tagSerialNumbers in the document you shared is an array. That is why you get
You have to $map tagSerialNumbers and convert with { $toLong : $$this }.
The field tagSerialNumbers in the document you shared is an array. That is why you get
You have to $map tagSerialNumbers and convert with { $toLong : $$this }.