5
Mengurai JSON dari XmlHttpRequest.responseJSON
Saya mencoba mengurai respons JSON bit.ly di javascript. Saya mendapatkan JSON melalui XmlHttpRequest. var req = new XMLHttpRequest; req.overrideMimeType("application/json"); req.open('GET', BITLY_CREATE_API + encodeURIComponent(url) + BITLY_API_LOGIN, true); var target = this; req.onload = function() {target.parseJSON(req, url)}; req.send(null); parseJSON: function(req, url) { if (req.status == 200) { var jsonResponse = req.responseJSON; var …