title: How to read JSON file in phonegap?
body: <p>I am using phonegap here.But how to read JSON file ??</p>
  
  <pre><code>function readAsText(file) {
    var reader = new FileReader();
    alert("inside readAstext");
    var jsonArray;
    reader.onloadend = function(evt) {
      displayContents = evt.target.result;
      alert("assigned");alert(displayContents);
      jsonArray = JSON.parse(displayContents);
  
    }
    reader.readAsText(file);
    handleResponse(true,jsonArray);
  }
  </code></pre>
  
  <p>here evt.target.result is displaying my file in alert as a sting . But once i parse that file I am getting [object object] once inside for loop. How to parse this ? Am i wrong?how to read each content of json here?</p>