I was wondering if there was a quick way to extract keys of associative array into an array, or comma-separated list using JavaScript (jQuery is ok).
options
You can use $.each() in jQuery:
$.each()
function keyArray(obj) { var rv = []; $.each(options, function(key) { rv.push(key); }); return rv; }
then
var keys = keyArray(options);
gives you ["key1", "key2"] as an array, which you could join to get a string.
["key1", "key2"]
join