Good day. I work with transferring JSON array. Does not work. There is such a code that loads the data from the data2.json file:
$.getJSON( "data2.json", function( json ) { console.log( "JSON Data: " + json); });
And the data2.json file:
[ ['Shanghai', 23.7], ['Lagos', 16,1], ['Instanbul', 14.2] ]
When the page is displayed in the browser, errors are displayed in the console: No 'Access-Control-Allow-Origin' header. Origin 'null' is therefore not allowed access.
And the XMLHttpRequest error cannot load file: /// C: /% D0% A1% D0% 90% D0% 99% D0% A2% D0% AB /% D0% 93% D1% 80% D0% B0% D1% 84 % D0% B8% D0% BA% D0% B8 / highcharts / column-rotated-labels / data2.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access
JQuery version 1.8.2. What did I do wrong to output the JSON array data? Prompt with arrays JSON never worked.