i am trying below code to remove the header of the...
# suitescript
v
i am trying below code to remove the header of the CSV
Copy code
let fileObj = file.load({id: fileId});
const iterator = fileObj.lines.iterator();

//skip the header
iterator.each(function () {
    return false;
});

let newContents = '';
iterator.each(function (line) {
    newContents += line.value;
});
log.debug(newContents);
But it returns only one line after the header not all the lines. what am i doing wrong?
b
read the entire File.lines.iterator help page
v
yes i did but i dont get it
It's the same as most things like this. "Return true to continue the loop"
v
Oh, Thank you so much, i missed it