In my code I refer to an API using the following
fetch('https://?....).then(response => {
return response.json();
However I have a requirement to pass in a local file (JSON) instead of the api url as below
fetch('file:///E:/testData.json')
I get the error "URL scheme must be "http" or "https" for CORS request
"
Would really appreciate if someone can point me the right direction here. How can I parse a local JSON in this case ? what am i doing wrong here