If it's a Properties type there is a 'keys' attribute:
var arrayOfKeys = propObj.keys;
If it's a plain old js object you can use a for loop:
var obj = {"key1":"value1","key2":"value2"}; var keys = []; for (var key in obj) { System.log(key+" : "+obj[key]); keys.push(key); }