@to-nice said in Multi parse csv string:
@sergerdn A quick question: with my other bot, when I have 100 accounts using the 'perfect fingerprint,' the bot completely freezes. Would using an external database help avoid this issue?
I don't know.
I am taking my database to my list in browser automation Studio but I'm facing a problem that it also has the row ID which I don't want I want to parse it so that is removed how we can do with the normal string
anyone any clue why this javascript is giving syntax error if? and also there is a proper documentary for the JavaScript that works with browser automation Studio please link it to me as well
function removeLastColumnsFromList(inputList, columnsToRemove) {
const outputList = inputList.map(inputString => {
const parts = inputString.split(':');
if (parts.length < columnsToRemove) {
return inputString; // Return the original string if there are fewer columns than requested to remove.
}
return parts.slice(0, parts.length - columnsToRemove).join(':');
});
return outputList;
}
// Example usage:
const inputList = [
"randomstring:randomstring:randomstring:randomstring:randomstring:randomstring:randomstring:randomstring",
"example1:example2:example3:example4:example5:example6",
"abc:def:ghi:jkl",
];
const columnsToRemove = 2;
const outputList = removeLastColumnsFromList(inputList, columnsToRemove);
var [[colist]] = outputList;