# Integromat Question... Aggregate Multiple JSON Values Grouped By Location?

**URL:** <https://community.glideapps.com/t/integromat-question-aggregate-multiple-json-values-grouped-by-location/39428>\
**Category:** Ask for Help\
**Created:** [March 9, 2022, 2:52pm UTC](https://community.glideapps.com/t/integromat-question-aggregate-multiple-json-values-grouped-by-location/39428 "2022-03-09T14:52:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darren\_Alderman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_alderman/32/66660_2.png) [@Darren\_Alderman](https://community.glideapps.com/u/Darren_Alderman)\
**Post date:** [March 9, 2022, 2:52pm UTC](https://community.glideapps.com/t/integromat-question-aggregate-multiple-json-values-grouped-by-location/39428/1 "2022-03-09T14:52:09Z")

</div>

Still trying to get comfortable in Integromat and struggle with what modules to use for this…

I have data that is basically this:

```auto
[
   {
       "location": "A",
       "hours": 4,
       "wages": 40
   },
   {
       "location": "A",
       "hours": 1,
       "wages": 10
   },
   {
       "location": "B",
       "hours": 2,
       "wages": 20
   },
   {
       "location": "B",
       "hours": 3,
       "wages": 30
   }
]

```

How can I get the sum of `hours` and the sum of `wages` grouped by `location` in integromat so that I can add a row for each location in a Google Sheet?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [March 9, 2022, 2:56pm UTC](https://community.glideapps.com/t/integromat-question-aggregate-multiple-json-values-grouped-by-location/39428/2 "2022-03-09T14:56:27Z")

</div>

I think what you probably want is an Iterator module after the Parse JSON module.

---

<div class="post-metadata">

**Author:** ![DarrenHumphries](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darrenhumphries/32/91715_2.png) [@DarrenHumphries](https://community.glideapps.com/u/DarrenHumphries)\
**Post date:** [March 9, 2022, 3:19pm UTC](https://community.glideapps.com/t/integromat-question-aggregate-multiple-json-values-grouped-by-location/39428/3 "2022-03-09T15:19:40Z")

</div>

Sorry for asking this if it’s an obvious answer but is there a reason you can’t do the sums in Glide or a formula in the target google sheet?

---

<div class="post-metadata">

**Author:** ![Darren\_Alderman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_alderman/32/66660_2.png) [@Darren\_Alderman](https://community.glideapps.com/u/Darren_Alderman)\
**Post date:** [March 9, 2022, 3:44pm UTC](https://community.glideapps.com/t/integromat-question-aggregate-multiple-json-values-grouped-by-location/39428/4 "2022-03-09T15:44:15Z")

</div>

Row count!

We don’t need to know the individual payments, just the sum. If we stored all the rows it could be 100s added every day. If we sum before writing to the sheet, it’s only 7 rows.

---

<div class="post-metadata">

**Author:** ![DarrenHumphries](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darrenhumphries/32/91715_2.png) [@DarrenHumphries](https://community.glideapps.com/u/DarrenHumphries)\
**Post date:** [March 9, 2022, 3:46pm UTC](https://community.glideapps.com/t/integromat-question-aggregate-multiple-json-values-grouped-by-location/39428/5 "2022-03-09T15:46:31Z")

</div>

Ah, gotcha.

---

<div class="post-metadata">

**Author:** ![Darren\_Alderman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_alderman/32/66660_2.png) [@Darren\_Alderman](https://community.glideapps.com/u/Darren_Alderman)\
**Post date:** [March 9, 2022, 5:36pm UTC](https://community.glideapps.com/t/integromat-question-aggregate-multiple-json-values-grouped-by-location/39428/6 "2022-03-09T17:36:27Z")

</div>

Finally got it! And I think I understand it 😉

 ![Screenshot 2022-03-09 113450](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/d/8df2be213159d08b0bc5147f5805749d91e64153.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Alderman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_alderman/32/66660_2.png) [@Darren\_Alderman](https://community.glideapps.com/u/Darren_Alderman)\
**Post date:** [March 10, 2022, 5:37pm UTC](https://community.glideapps.com/t/integromat-question-aggregate-multiple-json-values-grouped-by-location/39428/7 "2022-03-10T17:37:10Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
