Description
When calling iterator.Next(), it does not clear out the document of the value. Simply doing the following should be sufficient:
itr.elem.value.d = nil
|
The side effect this has if for values that use the document (.d) like subdocuments and arrays, if you have multiples in the source (reader), it'll never update to the current element since the previous value was already set.