I'd like to consume the following URL in my Google Apps Script:
http://a0.awsstatic.com/pricing/1/emr/pricing-mapr.min.js
Using the typical response = UrlFetchApp.fetch(url).getContentText()
doesn't really work, it just returns the JSON surrounded by callback()
. Is there a way to consume JSONP with Google Apps Script?
Code:
function myFunction() {
getEmrPricingData_();
}
/*
* Get EMR Prices
*
*/
function getEmrPricingData_() {
var emr_url = "http://a0.awsstatic.com/pricing/1/emr/pricing-mapr.min.js"
var response = UrlFetchApp.fetch(emr_url).getContentText();
Logger.log(response);
}