JSON string to CSV - string

Hello All ,

I am new to Node-red - i am having a issue to get json to csv , tried the node json2csv but don't get it to work.

Main goal is to get via insert Node a json string and then translate it into a csv string,

Can anybody give help ?

Roland

Did you try the built in csv node. It converts csv to a json object and from an object to csv. So if you start with a json string use a json node to convert from string to an object then the csv node to go from an object to csv.

Hi dceejay , i tried your suggestion and got this working , thanks !

I am trying to get a timestamp in the injection node with de following example json payload : {"abc":12345678,"defc":453478} - any suggestion ?

Can you explain your issue differently? I don’t understand what mean. Where is that data coming from?

Maybe showing your flow

If you are trying to INJECT a message with that then you can do it with a change node.

BUT check what the CSV node will convert. My guess is that it will convert the msg.payload to CSV so you would need to make msg.payload = {"abc":12345678,"defc":453478};