Transform parsed JSON to right format

I have a parsed JSON, but the data is not like I need it. How can I transform this JSON result:

To something like this:

date/sessions/pageviews are now under each other, but they need to be in the same line.
Any suggestions? Something with fill down I think but I am not getting it yet :slight_smile:

Can you please attach the JSON result as a file as well? You can right-click the Parse JSON action and select “Send to file - EasyMorph dataset (.dset)”

here you go:
Imported table 1.dset (13.0 KB)

It’s not possible to flatten this dataset into 1 line, because columns have non-unique values. For instance, these columns have more than 1 value:

  • metrics{*}
  • name
  • columnType
  • dataType

After you received the JSON response, you need to derive a few tables, and in each derived table parse only a subset (sub-object) of the received JSON by specifying the root path of that sub-object. The number of derived tables depends on the JSON structure.

Once you flatten sub-JSON’s, you can merge/append all of them together in one table as needed.

Here is an example how you can flatten data when every column has only 1 unique value:
flatten.morph (6.1 KB)

Thanks, will give that a try!

Hi, did some testing with this, but not yet convinced of the solution :slight_smile:

Did some more tweaking myself and got this result:

Next step is to move up the data of column ‘test’ one up, so the data matches with the date in column ‘{*}’. From then I can remove all unnecessary data.
Hope this also helps others :wink:

The "Shift column" action does exactly that.