Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

parse JSON URL

$
0
0

HI All,

 

I am unable to parse the JSON URL. The following is the code snippet :

 

<script src="//code.jquery.com/jquery-1.10.2.js"></script>

 

<script>

var getUrl = "http://api.openweathermap.org/data/2.5/weather?q=london";

    

$.ajax({

         url : getUrl,

         type : 'GET',

         dataType : 'json',

         crossDomain : true,

         success: function(data) {

         alert('sucess');

          alert(JSON.parse(edata));

        

         },                                                                                                                                                                                      

         error: function() {

        

          alert('error');

         }

     });

 

</script>

 

It is alerting with sucess message but unable to parse the json data. Please suggest the way forward.


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>