I have json file on local like "D:\ABC\JsonFile\file.json" and I need to read data in this file. When I run I got a error "Not allowed to load local" What wrong with my code?
This is my code.
$("#GetJsonData").click(function () {
$.getJSON("file://D:/ABC/JsonFile/jsondata.json", function (result) {
console.log(result.ContentName);
}).fail(function (jqXHR, txtStatus, errThrown) {
console.log("Status : " + txtStatus);
console.log("Error : " + errThrown);
});
});