Is it possible to work with 2 .json files simultaneously? My attempt did not succeed, so I am looking for an alternative method. If you have a suggestion or know the correct syntax to make this work, please share. And most importantly, does the second .json file actually get processed in this scenario?
sync function populate() {
const requestURL = 'nascar.json';
const request = new Request(requestURL);
const response = await fetch(request);
const nascarDrivers = await response.json();
findDriver(nascarDrivers);
}
async function texas() {
const requestURL = 'texasMS.json';
const request = new Request(requestURL);
const response = await fetch(request);
const texasLaps = await response.json();
findLaps(texasLaps);
}