How to divide array into json with headers

Hi , I need a help I am getting data in the array format and I have to create it in the json format to dump it in CSV file

Hi @mjain,

Maybe you could try and use the JSON Splitter Snap to split the array into separate JSON documents.

BR,
Dimitri

2 Likes

Hi Dimitri thanks for the quick reply I am attacting the screenshot can you please look into this. I have also tried json splitter but it is not working And the file header shoud be first array.

Capture1

I am expecting in
Capture2

Hi @mjain

Here’s a pipeline in which the elements in the nested array are transformed into JSON documents that can be consumed by a CSV Formatter Snap.
Array_to_CSV_2020_07_03.slp (7.2 KB)

Hope it helps.

BR,
Dimitri

4 Likes

Thank you so much. It worked.