New Host for JSON

This commit is contained in:
2023-04-18 19:54:44 -05:00
parent dc423b032e
commit bad00459e7

10
main.js
View File

@@ -25,7 +25,7 @@ function parseName() {
async function PapaParse(department, num, name) {
let cData = '';
await fetch('/data/2022 Fall.json')
await fetch('https://derec4.github.io/UT-Grade-Dist/2022%20Fall.json')
.then(res => res.json())
.then(data => {
cData = data;
@@ -33,6 +33,14 @@ async function PapaParse(department, num, name) {
.then(() => {
console.log(cData);
});
// await fetch('/data/2022 Fall.json')
// .then(res => res.json())
// .then(data => {
// cData = data;
// })
// .then(() => {
// console.log(cData);
// });
const selectedClass = cData.filter(cData => cData["Course Title"].includes(name.toUpperCase()));
console.log(selectedClass);