Forum Discussion

cbot412's avatar
cbot412
New Contributor II
2 years ago
Solved

Line Break in Mapper

  I have this below code, but the output csv contains \n instead of giving line break $id + '\n' + $crse_detail.toString().replace(/;/g, '\t\t').replace(/,/g, '\n') + '\n' + '**********' + '\n' I ...
  • endor_force's avatar
    2 years ago

    I am guessing you do not actually want a csv output but some sort of text file, based on that the content should be separate lines and then each block separated with the stars?
    If you have some other challenge please provide some sample input and maybe a mockup on what you expect out..

    I think you will only need to map the line as in your code above but in order to output the text with line breaks you can join all lines with \n and then push it as binary out to a file. 
    I have attached a sample for you to test with..