Skip to content

Instantly share code, notes, and snippets.

@devbyray
Created September 15, 2022 07:52
Embed
What would you like to do?
function csvToArr(stringValue) {
// Add logic
const [keys, ...rest] = stringVal
.trim()
.split("\n")
.map((item) => item.split(','));
console.log('csv keys: ', keys);
console.log('csv values: ', rest);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment