prorm API Reference
    Preparing search index...

    Interface ToJSONOptions

    Options for toJSON method

    interface ToJSONOptions {
        attributes?: string[];
        exclude?: string[];
        raw?: boolean;
        include?: IncludeOptions[] | Includeable[];
        clone?: boolean;
    }
    Index
    attributes?: string[]

    Only include these attributes in the output

    exclude?: string[]

    Exclude these attributes from the output

    raw?: boolean

    When true, bypass all transformations (no virtual fields, no hidden filtering)

    include?: IncludeOptions[] | Includeable[]

    Include nested associations

    clone?: boolean

    Clone the result before returning (prevents mutation)