Represents an iterator of report rows.
Typical usage:
var rows = report.rows();
while (rows.hasNext()) {
var row = rows.next();
}
Related:
Methods:
Member | Type | Description |
hasNext |
boolean |
Returns true if the search has more rows. |
next |
Object |
Returns the next row in the search. |
hasNext()
Returns
true
if the search has more rows.
Return values:
Type | Description |
boolean |
true if the search has more rows. |
next()
Returns the next row in the search.
Search rows are returned as plain Javascript objects. Individual requested fields can be
accessed by accessing the nested field.
var rows = AdsApp.search(
'SELECT search_term_view.search_term, metrics.ctr ' +
'FROM search_term_view ' +
'WHERE segments.date BETWEEN "2013-01-01" AND "2013-03-01"');
while (rows.hasNext()) {
var row = rows.next();
var searchTerm = row['search_term_view'];
var query = searchTerm['search_term'];
var ctr = row['metrics']['ctr'];
}
Return values:
Type | Description |
Object |
The next row in the search query. |