Aggregate (Free Online Tool)
Compute rollups and summary metrics over arrays such as count, sum, average, unique values, and flatten
Paste your JSON → Get results instantly (no signup)
→ Aggregate this data into a smaller result and get statistics.
1{2 "count": 5,3 "numericCount": 5,4 "sum": 150,5 "average": 30,6 "min": 10,7 "max": 508}Love the result?
Use this exact pipeline in your app, backend, or LLM workflow.
No setup needed. Works with curl, Node, Python.
Uses example data. For edited input, copy from the playground.
Works with:
- API responses
- Nested JSON
- Arrays & objects
Example: input → output
[ 10, 20, 30, 40, 50]{ "count": 5, "numericCount": 5, "sum": 150, "average": 30, "min": 10, "max": 50}Related tools
Read more on the blog
Advanced usage (optional)
Aggregate
v1.0.0Description
Aggregate
Statistical operations on arrays — count, sum, average, min, max, unique values, and flatten nested arrays into a single level.
Operations
Count / Sum / Average / Min / Max
Compute numeric statistics on array elements. Works on arrays of numbers directly, or on specific numeric fields within arrays of objects.
Stats
Returns all numeric statistics at once: count, numericCount, sum, average, min, and max in a single output object.
Unique
Remove duplicate values from arrays. Works with both primitives and objects (deep equality).
Flatten
Merge nested arrays into a single flat array. Useful when you have arrays of arrays that need to be combined.
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| Target Paths | path-picker | [] | Select array paths to aggregate (empty = aggregate root array) |
| Operation | enum | count | count, sum, average, min, max, stats, unique, or flatten |
Use Cases
Data Analysis
- Quick stats: Get count, sum, and average of numeric arrays in one pass with
stats - Score summary: Find min/max scores across a dataset
- Totals: Sum up order amounts, quantities, or other numeric fields
Data Cleanup
- Deduplicate: Remove duplicate entries from arrays with
unique - Flatten imports: Combine nested array responses from paginated APIs with
flatten
Reporting
- Record counts: Count items matching certain criteria after filtering
- Numeric ranges: Find the range (min to max) of values in a dataset
Configuration
| Name | Type | Default | Description |
|---|---|---|---|
| Target Paths | path-picker | [] | Select array paths to aggregate (empty = aggregate root array) |
| Operation | enum | count | count/sum/average/min/max: numeric statistics. stats: all combined. unique: remove duplicates. flatten: merge nested arrays. count sum average min max stats unique flatten |
Examples
Aggregate this data into a smaller result and get statistics.1{2 "count": 5,3 "numericCount": 5,4 "sum": 150,5 "average": 30,6 "min": 10,7 "max": 508}API Usage
curl -X POST https://your-domain.com/api/v1/utilities/analysis.aggregate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs":{"primary":[10,20,30,40,50]},"config":{"targetPaths":[],"operation":"stats"}}'1{2 "count": 5,3 "numericCount": 5,4 "sum": 150,5 "average": 30,6 "min": 10,7 "max": 508}