Function getCsvFromJsonObjectList

  • The getCsvFromJsonObjectList function generates a CSV file from a list of objects. It takes a list of objects, an optional array of property names to include in the file, an optional flag indicating whether to include a header row with the property names, and an optional map of property transformers as parameters. It uses the getCsvRowFromJsonObject function to generate rows for each object in the list.

    If no property names are provided, the properties of the first object in the list are used.

    Type Parameters

    Parameters

    • list: readonly T[]
    • properties: readonly string[] = undefined
    • includeHeader: boolean = true

      If the includeHeader flag is true, the first row of the CSV file will be a header row with the property names. If the includeHeader flag is false or not provided, no header row will be included.

    • propertyTransformer: CsvPropertyTransformerMap<T> = {}

    Returns Csv

Generated using TypeDoc