I want to push the options from a dropdown to the nested array "data".
var gnames = { data: [], list: { sort: { enabled: true } } };
$("#dropdown-group option.lgroup").each(function(){
gnames.data.push($(this).val());
});
$("#save-group").easyAutocomplete(gnames);
Why does it not work?
select- are you sure each of your options hasclass=lgroup? Or does theselecthave that class and that's your problem? We also don't know that yourselect id=dropdown-group(or the parent div could also have that id)