Syntax error when getting data in JSON file
<p>I try to make a simple JSON file get it using XMLHttpRequest.</p>

<p>I've debugged all I observed, but it still can't run, what's the problem here..</p>

<pre><code>var getData = function() {

    var xmlhttp = new XMLHttpRequest();
    var url = "battletheme.json";

    xmlhttp.onreadystatechange = function() {
        if(xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) {
            var themeinfo = JSON.parse(xmlhttp.responseText);
            showField(themeinfo);
        }
    };

    xmlhttp.open("GET", url, true);
    xmlhttp.send();
}

var showField = function(inputcat) {
    var txt = "";

    for(i=0; i&lt;inputcat.length; i++) {
        txt += "Place: " + inputcat.field[i].fieldname + " , Boundary: " + inpucat.field[i].rightboundary + " &lt;br&gt;";
    }

    document.getElementById("msg_box").innerHTML = txt;

}

getData();
</code></pre>

<p>And the JSON file is here: (It's all in my computer and in the same root)</p>

<pre><code>{"field": [
        {"fieldname" : "forest","leftboundary" : 1, "rightboundary" : 500},
        {"fieldname" : "jungle","leftboundary" : 1, "rightboundary" : 600},
        {"fieldname" : "island","leftboundary" : 1, "rightboundary" : 200}
]}
</code></pre>