Skip to content Skip to sidebar Skip to footer

Can't Get JSON Data From JQuery AJAX API Call

My API URL returns the following JSON: [{'_id':{'$id':'529c759d361ae724088b4568'},'name':'1877','soundcloud_url':'','genres':['rock','electro']}] Here is my jQuery AJAX call: $.aj

Solution 1:

The complete function receives the XHR object as a response. I believe you should be using .done(function...) to get the data:

This is taken from here: http://api.jquery.com/jquery.ajax/

$.ajax({
    url: gigniteAPI,
    dataType: "jsonp")
})
.done(function (data) {

     var ParsedObject = JSON.stringify(data);
     alert(ParsedObject);

     }
  })

;


Post a Comment for "Can't Get JSON Data From JQuery AJAX API Call"