You should add `false` as the second [`iterator_to_array()`](http://php.net/iterator_to_array) argument here, in case the document has a non-scalar `_id` value. This will also ensure the user gets back a numerically indexed (i.e. real) array, instead of an associative one.