Forum Discussion

SL12345's avatar
SL12345
New Contributor III
3 years ago
Solved

Splitting csv file into rows and then check if specified value has 10 elements

Hi snaplogic experts, how can i split csv file into rows and then check if value after 8th semicolon has 10 values? 1;2566;28.3.2023;28.3.2023;10;10;15;11;1,2,3,4,5,6,7,8,9,10;Eur;Euro;USD 2;...
  • viktor_n's avatar
    3 years ago

    Hi @SL12345,

    If you want to do this with expression then try this:
    $content.split("\n").map(row => {row: row, lengthValuse:row.split(';')[8].split(',').length })

    Regards,
    Viktor N.