---
title: Sum JSON Objects
slug: sum-json-objects
docTags: 
createdAt: 2021-12-22T07:28:32.000Z
---

Sums the values present in a given key in JSON Objects within a list



### API Definition

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/list/sum",
  "name": "Sum JSON  Objects API",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "28UsDqyeH3QRdmtVamSQT",
        "code": "{\n    \"output\": {\n        \"value\": 98.00999999999999,\n        \"cieling\": 99,\n        \"ceiling\": 99,\n        \"floor\": 98,\n        \"abs\": 98,\n        \"round\": 98,\n        \"round1\": 98,\n        \"round2\": 98.01,\n        \"1decimal\": \"98.0\",\n        \"2decimal\": \"98.01\",\n        \"3decimal\": \"98.010\"\n    }\n}",
        "language": "200"
      },
      {
        "id": "yIX64DyIuDPJgBRFSfAWb",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "28UsDqyeH3QRdmtVamSQT"
  },
  "examples": {
    "languages": [
      {
        "id": "ENcJz9TStG38F0X-taA4x",
        "code": "{\r\n\t\"input\": [{\r\n\t\t\t\"spend\": \"46.01\",\r\n\t\t\t\"type\": \"Travel\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"spend\": \"52\",\r\n\t\t\t\"type\": \"Food\"\r\n\t\t}\r\n\t],\r\n\t\"key\": \"spend\"\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "ENcJz9TStG38F0X-taA4x"
  },
  "description": "\nCall the following API:",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

















