Forum Discussion

salonimaggo's avatar
salonimaggo
New Contributor
2 years ago
Solved

How to skip 5 lines after every fourth line in snaplogic text file.

I am reading one text file in snaplogic and have to skip unnecessary lines after every 4th line. 
  • nativeBasic's avatar
    2 years ago

    Hello,

    You can group into an array and then:

    $myArray.filter((item, pos, a) => (a.indexOf(item)+1)%4 != 0)

    % is the MOD function.

    Hope it helps!