I'm using a book API that returns the following
var _OLBookInfo = {
"ISBN:234234234234234": {
"bib_key": "ISBN:234234234234234",
"preview": "noview",
"preview_url": "http://openlibrary.org/b/adsfasdfa",
"info_url": "http://openlibrary.org/b/adsfasdf",
"details": {
"publishers": [
"W. H. sdafasdfasdf"
]
}
};
How can I parse this with jQuery using the callback parameter of $.get()
Specifally, how do I get easy access to details -> publishers
Update
$.post("/Home/LookupBook", { query: lookuptxt.val() },
function (data) {
alert(data); //returns proper json data
alert(data.details.publishers[0]); // get erro saying details.publishers[0] is null
},
"json");