basic parsing

This commit is contained in:
TreetopFlyer 2021-03-17 15:43:19 -04:00
commit a5131387c0
3 changed files with 20 additions and 0 deletions

0
.gitignore vendored Normal file
View File

1
data.csv Normal file

File diff suppressed because one or more lines are too long

19
index.html Normal file
View File

@ -0,0 +1,19 @@
<script>
fetch("data.csv")
.then(inAccept=>inAccept.text(), inReject=>{console.log("couldnt fetch", inReject)})
.then(inAccept=>{
let lines = inAccept.split(">");
lines.pop();
let output = [];
lines.forEach(line =>
{
let columns = line.split("|");
output.push({
title:columns[0],
id:columns[1],
topics:columns[2].split(",")
});
});
console.log(output);
})
</script>