Statistical operations on arrays — count, sum, average, min, max, unique values, and flatten nested arrays into a single level.
Compute numeric statistics on array elements. Works on arrays of numbers directly, or on specific numeric fields within arrays of objects.
Returns all numeric statistics at once: count, numericCount, sum, average, min, and max in a single output object.
Remove duplicate values from arrays. Works with both primitives and objects (deep equality).
Merge nested arrays into a single flat array. Useful when you have arrays of arrays that need to be combined.
| 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 |
statsuniqueflatten| 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 |
Aggregate this data into a smaller result and get statistics.1[2 10,3 20,4 30,5 40,6 507]1{2 "count": 5,3 "numericCount": 5,4 "sum": 150,5 "average": 30,6 "min": 10,7 "max": 508}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}