Function: toDocumentArray()
toDocumentArray(
input):Record<string,unknown>[]
Parse a JSON document payload the model / a route supplied for a write. Accepts an already-parsed array/object or a JSON string, and always returns an array so a single document and a batch are handled the same way. Throws a ValidationError on unparseable input so the caller can surface it.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”Record<string, unknown>[]