JSON が戻ってきたので、自分のページに表示する必要がありますが、表示されないようです!
誰かが見て、私がどこで間違っているのかわかるかどうか見てもらえますか?
コード:
$.ajax({ type: "GET",
url: "URL GOES HERE - Cant give for obvious reasons :)",
dataType: "jsonp",
success: function (response) {
var result = response.d;
$.each(result, function (index, res) {
$('#questions').val(res.q);
});
},
error: function (msg) {
}
});
JSON:
{
"d": [
{
"id": "1002 ",
"q": "What region is Auchentoshan whisky made in",
"a1": "Highlands",
"a2": "Speyside",
"a3": "Lowlands"
},
{
"id": "1042 ",
"q": "Chase’s award winning vodka is made from...",
"a1": "Grapes",
"a2": "Rye",
"a3": "Potatoes"
}
]
}