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);
Baca Juga
- Find Difference Between Two Arrays (missing Values) In Google Apps Script
- I'm Trying To Make An Id Searcher Which Does A Thing When You Input The Right Id. However, The If Statement Always Runs. Why Is This?
- Gas: How To Change A Global Variable Value And Preserve Its Changed Value When Using The Variable In A Handler Function?
Post a Comment for "How To Parse Json Response In Google App Script?"