JSON CRUD icon

JSON CRUD

Perform CRUD operations on JSON data (perfect for Excel data)

Statistics

AI-generated

Summary

Calculate statistical summaries on JSON data, optionally grouped by a specified field.

Inputs

  • Statistics Field (required) — The field name of the numeric data to calculate statistics on.
  • Group By Field — An optional field name to group data by before calculating statistics per group.

Output shape

a list of items each containing JSON objects with statistical data such as count, sum, average, minimum, and maximum. When grouped, each item represents one group with its computed statistics; otherwise a single summary item is returned.

The operation reads the input items' JSON data and parses the specified statistics field as numbers. If a group by field is specified, it groups the input items by unique values of that field prior to calculation. Missing or non-numeric fields are treated as zero. The output includes fields: count, sum, avg, min, and max. Grouped output additionally includes the group key.

Examples

Example 1: Calculate overall statistics for the field 'sales' in input JSON items.

Set 'Statistics Field' to 'sales' and leave 'Group By Field' empty. The node outputs one item summarizing count, sum, average, minimum, and maximum of 'sales' over all input items.

Example 2: Calculate statistics grouped by 'category' for the field 'amount'

Set 'Statistics Field' to 'amount' and 'Group By Field' to 'category'. The node outputs multiple items, each representing a category with aggregated statistics on 'amount' for items in that category.

Links

Discussion