Я получаю данные json как ответ от сервера. Я хочу проанализировать эти данные JSON и встроить все данные во всплывающее окно.
var on_show_info = function() {
alert("aa");
request_meta_info = $.ajax({
url: data + info.id,
type: 'GET',
async: false,
dataType: "jsonp",
success: data,
error: error
});
};
var data = function(data, text_status, XMLHttpRequest) {
alert(data);
var html = '';
var info = {};
here I want that JSON parsing code as I am getting response back from the server in data field. Any help will be appreciated and I want to embed those parse data in to a popup window as shown below by this command `($('#popup-meta .popup-content').html(html);)`
});
$('#popup-meta').removeClass('waiting');
$('#popup-meta .popup-content').html(html);
};
Это ответ, который я получаю с сервера в виде данных JSON только для примера.
jsonp13082({"responseHeader":{"status":0,"Time":3,"params":{"json.wrf":"jsonp13082","wt":"json","q":"8377"}},"response":{"numFound":1,"start":0,"docs":[{"key":"83779616","number":"080","name":"Designated","name":"Non ","number":"27837","date":"2010-08-24T07:00:00Z","name":"Canada","name":"Application","title":"collision detection","date":"2008-03-03T08:00:00Z","id":"414","code":"CA","date":"2009-03-03T08:00:00Z","name":"Michael Henry","mgr_name":"William Henry","id":"79616","name":"oen","claims":"74","date":"2012-03-03T08:00:00Z","claims":"8","url":"","inventors":["D.","rshi","Pa"],"guid":["23","26","25"],"towners":["XYZ"],"inventors":["D","name2","name3"],"owners":["XYZ"]}]}})