Skip to content Skip to sidebar Skip to footer

How To Parse Json Response In Google App Script?

I'm using a Google AdWords/App Script and I got this response from DoubleClick Search. I'm trying to parse it to put in a Sheet/ into an array to work with and I'm not having much

Solution 1:

It is similar to regular JavaScript. You get the JSON response with UrlFetchApp service and then access the properties using the dot notation.

var response = authUrlFetch.fetch(url, options);
var data = JSON.parse(response.getContentText());
Logger.log(data.request.reportType);

Post a Comment for "How To Parse Json Response In Google App Script?"