Bitbybit Docs
    Preparing search index...

    Class JsonToCsvAutoDto<T> (Inputs.CSV)

    Feeds csv.jsonToCsvAuto: the objects to write, whose first entry's property names become the columns, whether to write a header line and the separators.

    Type Parameters

    • T = Record<string, unknown>
    Index

    Constructors

    • Type Parameters

      • T = Record<string, unknown>

      Parameters

      • Optionaljson: T[]
      • OptionalincludeHeaders: boolean
      • OptionalrowSeparator: string
      • OptionalcolumnSeparator: string

      Returns JsonToCsvAutoDto<T>

    Properties

    json: T[]

    The objects, one row each; the property names of the first one are the columns, in their order

    [{"name": "John", "age": "30"}]
    
    includeHeaders?: boolean

    When true, the first line holds the header names

    true
    
    rowSeparator?: string

    The text put between rows, normally a line break; \n written as two characters is used as one

    \n
    
    columnSeparator?: string

    The text put between cells, normally a comma; a cell containing it is wrapped in quotes

    ,