Trouble with converting api result to csv

Working on worklow 5e1de0447cb6710007b558d1 , Virtual button B.

I struggle to format the result path containing the CSV string.
Just want time stamp and each data point on each row.

I’m doing something wrong.

Hi @Lars_Andersson,

Could you include some screenshots of your workflow, debug log, and node configurations?

Thanks!
Julia




image

csv file look like this

Hi @Lars_Andersson,

Understood. The CSV: Encode Node is not able to flatten nested data with your current configuration, but there are multiple ways you can go about solving this.

Your first option is to use a Loop Node to move the values that exist in data to within the same object as time. This would give you an array that contains no nested objects and is easily converted by the CSV: Encode Node.

The second option would be to explicitly define your headers. In my testing, my data started with the same structure as yours above:

But by defining the individual headers I wanted, my CSV comes out as I expected:

Thanks!
Julia

When try the second option, I only get the time field, even though I defined 2 more header values

Hi @Lars_Andersson,

I do apologize, that screenshot was not complete, it is updated now. You will need to use data as a prefix when selecting which values you would like in your CSV.

Thanks!
Julia