Get keys of a dictionary in Google Apps Script
To get all the keys of a dictionary in Google Apps Script or Javascript, do as following:
var mydata = {'key1': value1, 'key2': value2};
var keys = Object.keys(mydata);
var mydata = {'key1': value1, 'key2': value2};
var keys = Object.keys(mydata);