JSON to CSV conversion - flattening nested product data

I'm importing product data from Sales Layer API (JSON format) and need to convert it to flat CSV for multiple export channels.

Need to flatten this into CSV with columns like: id, name, weight, dimensions, category_1, category_2, variant_size_1, variant_price_1, etc.

Does anyone have experience with JSON normalization in EasyMorph? Looking for the most efficient transformation approach

Hi Pär and welcome to the Community!

Check out the "Parse JSON" action - it flattens a JSON.

Alternatively, if you only need to pick selected properties of a JSON, see the "Extract JSON properties" action.

Thank you, Dmitry! I made my life's first API and imported the file with Import from Web API. So it's flattened, right, but it makes no sense for further processing. So maybe Web request, save file and then Extract JSON? Thanks for guiding me, I'm learning.

Yes, "Import from Web API" parses received JSON into a flat table automatically, no need to use "Parse JSON" additionally.

Why does it make no sense? Keep in mind that JSON objects are frequently hierarchical and may nest other objects.

When hierarchical objects are flattened - some properties may be repeated multiple times, that's normal.

1 Like