Skip to content

Final result is always an Array of Object, why? #45

@thecamarada

Description

@thecamarada

Hey devs.
Imagine you fetch a single result with Mongoose that bring an single object:
{ name: 'foo', surname: 'bar', age: 18 }

After transform using this lib the final output is always an Array of object:
[{ name: 'foo', surname: 'bar', age: 18 }]

Is it possible in this cases to respect the output? If is an object, stay with the object, if is an array of objects (even with lenght 1) stay being a array of object?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions