Хочу сделать так что бы ответ который приходит с сервера отображался на экране, не не могу найти как это сделать.
$.ajax({
url: theUrl,
method: "GET",
dataType: 'jsonp'
})
.done(function(data) {
alert( "Прибыли данные: " + data );
debugger;
$.each( data, function( key, val ) {});
}).fail(function(jqXHR, textStatus) {
alert( "Request failed: " + textStatus );
});
Вот пример того что приходит с data
{"wrapperType":"track",
"kind":"song",
"artistId":909253,
"collectionId":120954021,
"trackId":120954025,
"artistName":"Jack Johnson",
"collectionName":"Sing-a-Longs and Lullabies for the Film Curious George",
"trackName":"Upside Down",
"collectionCensoredName":"Sing-a-Longs and Lullabies for the Film Curious George",
"trackCensoredName":"Upside Down",
"collectionPrice":10.99,
"trackPrice":0.99,
"collectionExplicitness":"notExplicit",
"trackExplicitness":"notExplicit",
"discCount":1,
"discNumber":1,
"trackCount":14,
"trackNumber":1,
"trackTimeMillis":210743,
"country":"USA",
"currency":"USD",
"primaryGenreName":"Rock"}