I\'m trying to load a local JSON file but it won\'t work. Here is my JavaScript code (using jQuery):
var json = $.getJSON("test.json"); var data = e
json_str = String.raw`[{"name": "Jeeva"}, {"name": "Kumar"}]`; obj = JSON.parse(json_str); console.log(obj[0]["name"]);
I did this for my cordova app, like I created a new javascript file for the JSON and pasted the JSON data into String.raw then parse it with JSON.parse
String.raw
JSON.parse