Get options of select element as JSON
var selectOptionsAsJSON = function(selectEl) {
var result = [], options = selectEl.options;
for (var i=0; i < options.length; i++) {
result.push({"text":options[i].text, "value":options[i].value});
}
window.prompt('Done. Copy text:', JSON.stringify(result));
return result;
}