# Expand JSON dataset into columns instead of rows

**URL:** <https://community.parabola.io/t/expand-json-dataset-into-columns-instead-of-rows/2479>\
**Category:** Ask a question\
**Tags:** Building-Flows\
**Created:** [August 19, 2022, 6:21pm UTC](https://community.parabola.io/t/expand-json-dataset-into-columns-instead-of-rows/2479 "2022-08-19T18:21:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Axel\_Delgado](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Axel\_Delgado](https://community.parabola.io/u/Axel_Delgado)\
**Post date:** [August 19, 2022, 6:21pm UTC](https://community.parabola.io/t/expand-json-dataset-into-columns-instead-of-rows/2479/1 "2022-08-19T18:21:51Z")

</div>

I’m pulling from an API to send to Google Sheets, but there is some deep nested data in the JSON where I only need some specific values out of there. However, I want to maintain the amount of rows I have, and not have them multiplied based on the nesting levels.

Having extra rows means I need to find a way to merge them to avoid losing data.

If I can flatten them into extra columns, I can just delete the extra columns, but always keep all the values linked to each row.

I had a search but couldn’t find a related request.  
Many thanks. Just discovered Parabola after 4 days of fighting to find a tool that can do this properly. Parabola perfectly fits the bill, and I’m SO close now!

---

<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:** [August 19, 2022, 10:49pm UTC](https://community.parabola.io/t/expand-json-dataset-into-columns-instead-of-rows/2479/2 "2022-08-19T22:49:58Z")

</div>

Hi @Axel_Delgado- Welcome to the Parabola Community! Happy to help as you build this out. If the duplicate rows have overlapping information, it sounds like you may want to use a [Merge duplicate rows step](https://parabola.io/transform/merge-duplicate-rows). This would merge the information from those rows into one.

Once you’ve done that, you would then expand that information into multiple columns using a [Split column step](https://parabola.io/transform/split-column).

Let me know if you have any questions!

---

<div class="post-metadata">

**Author:** ![Axel\_Delgado](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Axel\_Delgado](https://community.parabola.io/u/Axel_Delgado)\
**Post date:** [August 20, 2022, 7:46am UTC](https://community.parabola.io/t/expand-json-dataset-into-columns-instead-of-rows/2479/3 "2022-08-20T07:46:13Z")

</div>

Thanks @Emory_Stainbrook.

I was asking to do it directly because other tools have the option to expand directly into a single row during extra columns.

I understand then that there’s no way around it and I have to do that process, correct?

I’m trying to do what you suggest, but I’m struggling.

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

The merge duplicate rows is the conflicting step and can’t find a way of doing what I want. Here’s the data structure before merging.

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

I’d like to merge here, but the “assignees username” column should merge only unique values, as there’s no point on repeating them. Same for the “custom\_fields type\_config options name”.

However, I can’t activate the check to merge only uniques, since then the and “custom\_fields value” lose their correlation to the “custom\_fields name” due to blanks and repeated numbers and I cannot use the values properly.

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

Any idea what can I do?

---

<div class="post-metadata">

**Author:** ![Axel\_Delgado](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Axel\_Delgado](https://community.parabola.io/u/Axel_Delgado)\
**Post date:** [September 1, 2022, 10:04am UTC](https://community.parabola.io/t/expand-json-dataset-into-columns-instead-of-rows/2479/4 "2022-09-01T10:04:09Z")

</div>

Bump @Emory_Stainbrook

---

<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:** [September 1, 2022, 8:29pm UTC](https://community.parabola.io/t/expand-json-dataset-into-columns-instead-of-rows/2479/5 "2022-09-01T20:29:54Z")

</div>

Hey @Axel_Delgado ,

Sorry to hear that the option to merge only unique values isn’t working on your flow. Would you mind emailing us at [help@parabola.io](mailto:help@parabola.io) a link to your Flow so we can troubleshoot your step?

Thanks!  
Ayana

---

<div class="post-metadata">

**Author:** ![Axel\_Delgado](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Axel\_Delgado](https://community.parabola.io/u/Axel_Delgado)\
**Post date:** [September 2, 2022, 9:13am UTC](https://community.parabola.io/t/expand-json-dataset-into-columns-instead-of-rows/2479/6 "2022-09-02T09:13:18Z")

</div>

No worries, I found a solution myself. It’s a bit of a hassle, but it works.

I created a sub table by removing all the columns with duplicated values, leaving only ID and the expanded dataset.

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

Then I pivot the columns to get the 229 original rows again, with all the values per ID in a single row.

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

And then I combine it back with the original table, that I have merged duplicated rows only with Unique values (losing data on those columns, but removing them anyway).

It looks like this:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/1/163cfb034953475c4d94a0746ae59a7951734eea.png)
