SO jQuery Fiddle
Test Fiddle mainly for SO Questions jQuery 1.4.3, UI 1.8.5
by Nick Craver
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/ui-lightness/jquery-ui.css">
JavaScript
var options = {key1: "value1", key2: "value2"};
var keys = [];
for(var key in options) {
if(options.hasOwnProperty(key)) { //to be safe
keys.push(key);
}
}
var keyString = keys.join(", ");
alert(keyString);