Hi firstly, please wrap flow and code in triple backticks ``` (the forum messes with code and it becomes unusable see how to post code)
Why do you say that? As you can see in your debug output, the CSV is correctly formatted (i.e. the Name "Novak, John" is correctly surrounded with quotes because it has a comma.)
Secondly, why convert to CSV at all? As you have the values in a JS object (the first debug output) - you could simply pass that data straight to MySQL e.g...
Lastly - if you REALLY REALLY insist on changing a character in the name property
of an the row object
inside your array
so you need to address each one - but - there could be an unknown amount of rows (i.e. the array size will be dynamic based on the spreadsheet content) - you will need to either loop through each row and modify each item.
This might be possible in JSONata but I dont know JSONata too well and if its a large array, standard JS loop will be much faster.
try adding a function node between the "sheet to json" and the "json to csv" node with the below...
//loop through each row
// replace , with |
// in the Name property
// of each object in the array
for (let i = 0; i < msg.payload.length; i++) {
msg.payload[i].Name = msg.payload[i].Name.replace(",","|")
}
return msg;