# Construct Array of Objects (from relations) to be used in an API Call

**URL:** <https://community.glideapps.com/t/construct-array-of-objects-from-relations-to-be-used-in-an-api-call/72667>\
**Category:** Ask for Help\
**Created:** [April 17, 2024, 4:17pm UTC](https://community.glideapps.com/t/construct-array-of-objects-from-relations-to-be-used-in-an-api-call/72667 "2024-04-17T16:17:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rupert](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rupert/32/44178_2.png) [@Rupert](https://community.glideapps.com/u/Rupert)\
**Post date:** [April 17, 2024, 4:17pm UTC](https://community.glideapps.com/t/construct-array-of-objects-from-relations-to-be-used-in-an-api-call/72667/1 "2024-04-17T16:17:10Z")

</div>

Hi Glide wizzards,

I wanted to record how to use the new [DocsAutomator](https://docsautomator.co/) version with Glide using “Call API”, but I can’t figure out how to construct arrays of objects without those objects becoming one big string (this is for dynamic tables / line item tables).

I have two tables: Invoices and Line items. One invoice can have multiple line items.

In the line items table, I’m building the row objects using `JSON Object`:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/2/129683d3645d03e1968b93ffd9315fe70e06be3a.png)

In the invoices tables, I now need to “roll up” those objects. I’m using `Joined List` for that:

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/e/8e48189b3f816570b1848bc7c9b2c34c4b405bbb.png)

Eventually this needs to become an array, so I’ve used `Make Array`. The issue is that this actually produces an array of a single string / text:

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/f/dff853ca6441a3cef6d9df4a9c81e0a6de2e1f92.png)

Before trying more variations of different fields, I thought I’d reach out 🙂

Thanks a lot for your help!

---

<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:** [April 17, 2024, 4:22pm UTC](https://community.glideapps.com/t/construct-array-of-objects-from-relations-to-be-used-in-an-api-call/72667/2 "2024-04-17T16:22:08Z")

</div>

Try using a Lookup instead of a Joined List, and pass that into a JSON Template column.

---

<div class="post-metadata">

**Author:** ![Rupert](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rupert/32/44178_2.png) [@Rupert](https://community.glideapps.com/u/Rupert)\
**Post date:** [April 17, 2024, 4:26pm UTC](https://community.glideapps.com/t/construct-array-of-objects-from-relations-to-be-used-in-an-api-call/72667/3 "2024-04-17T16:26:23Z")

</div>

Thank you, @Darren_Murphy! Absolute legend. `Joined List` seems to stringify, whereas `Lookup` preserves objects.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [April 24, 2024, 4:27pm UTC](https://community.glideapps.com/t/construct-array-of-objects-from-relations-to-be-used-in-an-api-call/72667/4 "2024-04-24T16:27:04Z")

</div>

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