sum
AggregateSums the numeric values in an array. With a field argument, extracts that field from each object and sums the resulting numbers. Non-numeric values are treated as 0.
Syntax
sum:field?fieldoptionalField name to sum from each object. Omit for arrays of numbers.Use cases
| Use case | Description | URL | |
|---|---|---|---|
| Total stars across all repos | Add up all star counts to get a user's GitHub star total. | https://httpip.es/api/pipe/fetch:https://api.github.com/users/octocat/repos|sum:stargazers_count | |
| Total forks across all repos | Measure the overall reach of all forkable repos combined. | https://httpip.es/api/pipe/fetch:https://api.github.com/users/octocat/repos|sum:forks_count | |
| Sum open issues | Count the total open issue backlog across all repos. | https://httpip.es/api/pipe/fetch:https://api.github.com/users/octocat/repos|sum:open_issues_count | |
| Sum a literal number array | Add up a hardcoded list of numbers. | https://httpip.es/api/pipe/echo:[10,20,30,40,50]|sum |