Summarize by Group
2 min
Groups by a key and then sumarrized the values present in a given key in JSON Objects within a list.
Setting | Description |
|---|---|
value_field | Summarizes the value in this field. User substitution curls |
group_fields | One or many fields that the value should be grouped by. Use substitution curls in the list of fields. See example request |
input | List of JSON Objects |
API Definition
Sum JSON Objects API
Call the following API:
POST
https://orca.pathfix.com/functions/list/groupandsummarize
{
"input": [
{
"email": "[email protected]",
"source": "facebook",
"other":"test",
"date":"2022-01-25",
"lead_value":"2000"
},
{
"email": "[email protected]",
"source": "facebook",
"date":"2022-02-12",
"lead_value":"4500"
},
{
"email": "[email protected]",
"source": "linkedin",
"date":"2022-02-15",
"lead_value":"3200"
}
],
"value_field":"{{lead_value}}",
"group_fields":[
"{{source}}"
]
}