An optional parameter you can include is the sort
, which allows you to specify which category you would like to sort by. Here’s the basic pattern and some examples:
/* basic pattern:*/
"sort": {
[metric/category name]: [direction]
},
/* examples:*/
"sort": {
"clickCount": "DESC"
},
"sort": {
"publisherWebsiteName": "ASC"
},
/*It is also possible to add multiple sort statements.
*/
"sort": {
"clickCount": "DESC",
"publisherWebsiteName": "ASC"
}