Skip to content

Glossary: MongoDB

toArray

Also written: toArray()

A cursor method that reads all results into an ordinary JavaScript array, which you need to loop with `for...of` or return from a route.

Where the book teaches it

Related terms

Cursor