$.ajax({
url: 'https://s3.ap-northeast-2.amazonaws.com/cs374-csv/country_capital_pairs.csv',
type :"GET",
dataType:"json",
success: function(response){
if(response.success){
var window = response.pairs;
}
else{
alert("Errors");
}
}
});
我正在尝试通过使用jQuery.ajax发出请求来从URL中检索Json数组。我的输出显示如下:
window.pairs
(171) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…},
但是,预期输出应该像这里的照片一样, Expect Output。我该如何解决?