# JSON parsing to columns and not rows

**URL:** <https://community.parabola.io/t/json-parsing-to-columns-and-not-rows/2694>\
**Category:** Ask a question\
**Tags:** Using-APIs\
**Created:** [March 20, 2023, 11:04pm UTC](https://community.parabola.io/t/json-parsing-to-columns-and-not-rows/2694 "2023-03-20T23:04:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthony](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anthony](https://community.parabola.io/u/anthony)\
**Post date:** [March 20, 2023, 11:04pm UTC](https://community.parabola.io/t/json-parsing-to-columns-and-not-rows/2694/1 "2023-03-20T23:04:26Z")

</div>

Hi, I am pulling JSON via the API pull and the format is not great so it creates 3000 columns. I am able to flip table and clean as needed for my results. However, if I try to pull 2+ request I exceed maximum allowable columns.

Ideally I would like to save RAW JSON response somewhere and post process via regex to fix issues so it reads into rows and then I could batch process all the files without running into column issues.

Any ideas or work around would be appreciated. Is there a subroutine pattern I can use?

Thanks,  
Anthony

---

<div class="post-metadata">

**Author:** ![Ayana\_Usui](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/ayana_usui/32/1985_2.png) [@Ayana\_Usui](https://community.parabola.io/u/Ayana_Usui)\
**Post date:** [March 20, 2023, 11:47pm UTC](https://community.parabola.io/t/json-parsing-to-columns-and-not-rows/2694/2 "2023-03-20T23:47:08Z")

</div>

Hi @anthony, welcome to Parabola

Is there by chance a `Response JSON` configured on your Pull from API step? If so, could you try removing this setting so the data set is condensed when being brought into the Flow?

If there is no `Top Level Key` on your API pull, another option may be to utilize multiple API steps to pull in the data. After pulling in the data, you can use the `Stack Tables` or `Combine Tables` step to connect the data sets.

Let us know if you have any additional questions getting this set up!  
Ayana

---

<div class="post-metadata">

**Author:** ![anthony](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anthony](https://community.parabola.io/u/anthony)\
**Post date:** [March 21, 2023, 2:02am UTC](https://community.parabola.io/t/json-parsing-to-columns-and-not-rows/2694/3 "2023-03-21T02:02:28Z")

</div>

The confusion on my part is the api tool pulls the json and allows me to run regex to clean up format as needed to send to a table as needed.

However the enhanced api tool is fed 2 ids and it automatically parses each json response and that is the problem - if it just held the top level json per response like the api tool i could regex and fix format of each response before sending to json expand tool

 ![image](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/f/f75f9a80e850ee2f8766cdb3b78a032efc9b4faa.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/a/a9e753495568cb21c01c551ff80336e3d522eb1e.png)

---

<div class="post-metadata">

**Author:** ![Ayana\_Usui](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/ayana_usui/32/1985_2.png) [@Ayana\_Usui](https://community.parabola.io/u/Ayana_Usui)\
**Post date:** [March 21, 2023, 4:34pm UTC](https://community.parabola.io/t/json-parsing-to-columns-and-not-rows/2694/4 "2023-03-21T16:34:51Z")

</div>

Thanks for providing those details! Could you confirm if there are any settings enabled on the `Response JSON` section? That may help with condensing the data when it’s first brought into the flow.

Best,  
Ayana

---

<div class="post-metadata">

**Author:** ![anthony](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anthony](https://community.parabola.io/u/anthony)\
**Post date:** [March 21, 2023, 4:51pm UTC](https://community.parabola.io/t/json-parsing-to-columns-and-not-rows/2694/5 "2023-03-21T16:51:11Z")

</div>

I get the same results with it selecting top level as well as if it is un-selected in enrich with API.

---

<div class="post-metadata">

**Author:** ![Ayana\_Usui](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/ayana_usui/32/1985_2.png) [@Ayana\_Usui](https://community.parabola.io/u/Ayana_Usui)\
**Post date:** [March 21, 2023, 5:11pm UTC](https://community.parabola.io/t/json-parsing-to-columns-and-not-rows/2694/6 "2023-03-21T17:11:10Z")

</div>

Apologies for the confusion - were you hoping to utilize the Enrich with API step or the Pull from API step? Also could you explain which API Tool is pulling in the response and the format that it’s pulling in so we can better understand how to help set up your step?

If you need additional help in building out your flow, feel free to email us ([help@parabola.io](mailto:help@parabola.io)) the URL Link to your Flow so we can get a better understanding of what you were hoping to build in your automation!

---

<div class="post-metadata">

**Author:** ![anthony](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anthony](https://community.parabola.io/u/anthony)\
**Post date:** [March 21, 2023, 5:32pm UTC](https://community.parabola.io/t/json-parsing-to-columns-and-not-rows/2694/7 "2023-03-21T17:32:36Z")

</div>

Yeah sorry for confusion on my end.

I have multiple end points with different IDs but same results format but could have different amount of key/values.

I had started with “Pull from API” and was able to use regex to fix the json format so it would parse with a “Expand JSON” correctly - eg not 3000+ columns but rows instead.

I then started using “Enrich with API” so I could pass the various endpoint IDs. At that point it crashed because the total column count went above 8000 because of horrible json format.

The Enrich tool seems to automatically parse the JSON vs leaving it raw the way Pull from API works. If enrich worked like pull I could move forward by fixing each row of raw json from each endpoint with regex and then expand json tool.

Does that help?

---

<div class="post-metadata">

**Author:** ![Emory\_Stainbrook](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/emory_stainbrook/32/1772_2.png) [@Emory\_Stainbrook](https://community.parabola.io/u/Emory_Stainbrook)\
**Post date:** [March 22, 2023, 6:31pm UTC](https://community.parabola.io/t/json-parsing-to-columns-and-not-rows/2694/8 "2023-03-22T18:31:02Z")

</div>

Hi @anthony - Stepping in for Ayana. Our Enrich with API step currently will expand that top row. We’d be happy to take a closer look at the Flow to see if we can suggest any workarounds. Could you please reach out to us at [help@parabola.io](mailto:help@parabola.io) and send over a link the Flow that you’re working on?
