getjson alternative method for variable

Posted by Florian Stanek on Stack Overflow See other posts from Stack Overflow or by Florian Stanek
Published on 2012-10-15T21:07:37Z Indexed on 2012/10/15 21:37 UTC
Read the original article Hit count: 188

Filed under:
|

I made a script which gets the data from a json file and parse it. It worked on a webserver.

But now I have to find a solution to get it work on a local file (file:///C:/xampp/htdocs/script/index.html) instead on a server. It only works in FF:

$.getJSON('data2.json', function(data) {   
    $.each(data.selection_form.entities, function(i,name){
        ...do something
     });
});

Any ideas? A local webserver is not a solution.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JSON