User:Animum/formatresponse.js

function formatResponse(response) { //This bit was stolen from Gracenotes. Thanks, Gracenotes! try { response = response.query.pages; for (var property in response) return response[property]; } catch (e) { return response.query.pages["-1"]; } }