Home > DeveloperSection > Forums > Parse Json file with Jquery ? not working
jacob rasel
jacob rasel

Total Post:88

Points:616
Posted on    May-11-2013 3:26 AM

 JSON JSON 
Ratings:


 1 Reply(s)
 1470  View(s)
Rate this:
Hi Expert!

I am trying to parse json file in my phonegap application. 

here is my code

  $.getJSON('http://shobingg.com/cms/sites/php/message.json',
  function(data)
  {    
      $.each(data, function(i, item) {
          alert (item.message);
      });
      //$("#div-my-table").append("</table>");
  });

Please help me!
Thanks in advance! 


AVADHESH PATEL

Total Post:604

Points:4228
Posted on    May-11-2013 9:58 AM

Hi Jacob!

Try this:

$(document).ready(function() {
    var url =  "http://www.shobingg.com/cms/sites/php/message.json";
    $.getJSON(url + "?callback=?", null, function(data) {
        console.log(data);
    });
});


Don't want to miss updates? Please click the below button!

Follow MindStick