json-fs-query
    Preparing search index...

    Function groupBy

    • Group rows by each field in turn. The groups are a list in the order their first row came, so a sort before grouping orders the groups too (and the rows within each one).

      Parameters

      • dataSet: Object[] = []
      • fields: string[] = []

      Returns Object[] | Group[]

      The rows as they were when there's no field, otherwise the groups.